Hi,
i just wrote a very small perl-file, which opens a file, reads the content,
adds a 1 and closes it. It's a
veery simple hitcounter. (counter.pl, code see below)
I would like now to print this in an existing html-sheet, say, when opening
index.html, this program should be
executed an
both of these options are great. but I'll tell you what I did. I bought a
copy of "the perl cd bookshelf" on www.half.com that's the first one not the
second one. Learning Perl 2nd Edition is on the cd along with perl in a
nutshell, Programming Perl, 2nd edition, Perl Cookbook, Advanced Perl
Prog
say, how can I get the script to
figure out that the 1st of July this year was a Monday? Anyone know of
any example scripts or snippets of code I could look at for this
project?
Thanks,
Roger
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ccess Database that's
stored on the server??
Thanks,
Roger
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
try
chmod 0755 *.*
- Roger -
- Original Message -
From: "Luinrandir Hernson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, February 03, 2002 8:54 PM
Subject: wildcard for unix
What is the global wildcard for unix?
In this case I think you drop into shell
`mkdir -p $fullpath`;
# And check for errors!!!
- Roger -
- Original Message -
From: "Rene Verharen" <[EMAIL PROTECTED]>
To: "Beginners-CGI List" <[EMAIL PROTECTED]>
Sent: Saturday, January 19, 2002 5:01 PM
Sub
Sorry.
That line should probably be
foreach (0..$#columns)
Odd message, though.
- Roger -
- Original Message -
From: "Gerry Jones" <[EMAIL PROTECTED]>
To: "Roger C Haslock" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 20
gt;'1', -align=>'CENTER', -valign=>'TOP'},
Tr({-align=>'CENTER', -valign=>'TOP'},
[
th(\@columns)
]
),
$rows
)
- Roger -
- Original Messag
successive Vhost sections relating to the same
subdomain? If so, you may need to rewrite the httpd.conf file.
- Roger -
- Original Message -
From: "Darryl Schnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 1:02 PM
Subject: Question rega
I quote from perlfaq5:-
How do I randomly update a binary file?
If you're just trying to patch a binary, in many cases something as simple
as this works:
perl -i -pe 's{window manager}{window mangler}g' /usr/bin/emacs
However, if you have fixed sized records, then you might do something more
http://aspn.activestate.com/ASPN/Modules/dist_html?dist_id=8887
GD 1.33
Interface to Gd Graphics Library
CPAN
Released:
Author: LDS
PPM Platforms: Linux
Windows
Version: GD 1.27.2
Perl Version: 5.6
Release Date: PP
comparing those with those of the group, should be quite effective. If a
suitable filter is found, we might offer it to other groups, for they are
liable to the same damage.
- Roger -
- Original Message -
From: "Stephan Tinnemeyer" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTEC
OT:
Such people should have their e-mail priveleges removed.
- Roger -
- Original Message -
From: "Dean Theophilou" <[EMAIL PROTECTED]>
To: "lynn bui" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, December 02, 2001 4:57 AM
Subject: RE: Fw
$datacapture = `$command`;
$successorfailure = $?;
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 4:57 PM
Subject: RE: Redirecting STDOUT to a variable...
> Hi
> Thanks, but I need
>> Obviously, split(/ /, $line) doesn't produce the array I really want.
I don't understand the word 'obviously': what results are you getting?
Have you tried the safer
split /\s+/, $line; # split on any sequence of whitespace
- Roger -
- Original Message
while ($line =~ s/([^\r]{60})[^\r]/$1\r/){
; # as long as 60 characters are not followed by a \r, put one in
}
- Original Message -
From: "Pedro A Reche Gallardo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 09, 2001 7:27 PM
Subject: printi
]';
use constant USERNAME => scalar getpwuid($<);
use constant USERINFO => getpwuid($<);
2)
You can write your own private module, which defines such things.
Cheers
- Roger -
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Just a suggestion, but could someone set up a newsgroup for those that want
out, but can't make it. (And someone else arrange their swift transfer to
it!)
- Roger -
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If you are sure its a string, maybe you can use 'unpack', and then 'join'.
- Roger -
- Original Message -
From: "Shannon Murdoch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 11:20 AM
Subject: $variable manipulat
advances to the next line, and used without a carriage return,
enabled e.e.cummings to write his non-stop paragraphing.
- Roger -
- Original Message -
From: "Guy Tubbs" <[EMAIL PROTECTED]>
To: "Roger C Haslock" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]&
Something like this?
my $othercharacter = 'Z';
$yourvariable =~ s/\r/$othercharacter/g;
# \r is carriage return
# /g at the end means do them all
- Roger -
- Original Message -
From: "Guy Tubbs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
First note
> my $wordtodelete = "[Deletethis];
should have a trailing quote mark, like this
> my $wordtodelete = "[Deletethis]";
Perhaps you need something like
my $wordtodelete = "\[Deletethis\]";
- Roger -
- Original Message -
From: &
her they are
expected, but have not been given a value.
Regards
- Roger -
- Original Message -
From: "Teresa Raymond" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 2:02 PM
Subject: How to ck for null set w/ Checkboxes
> How do y
o create a
functional module.)
I, too, would be interested in other views on this subject.
- Roger -
- Original Message -
From: "Stephan Tinnemeyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 2:22 PM
Subject: structure of scripts
I have some time free: Can you give an idea of what is wanted.
- Roger -
- Original Message -
From: "Mark Bergeron" <[EMAIL PROTECTED]>
To: "Gary Stainburn" <[EMAIL PROTECTED]>; "Bradley M. Handy"
<[EMAIL PROTECTED]>; "Teresa R
:
my %se = { "av" => "AltaVista",
"yh" => "Yahoo",
"gg" => "Google"};
my $searchengine = $q-> param('searchengine');
my $search = new WWW::Search ($se{$searchengine });
Regards
- Roger -
---
it, instead of before? Why do
you redefine it on every call to the subroutine? Why do you call for
$se{searchengine}, when you have only defined $se{av}, $se{yh} and $se{gg}?
Why do you call the subroutine only once?
- Roger -
- Original Message -
From: "Sunthari" <[EMAIL PRO
ng cookies, but works if cookies aren't enabled.
You must realise, however, this is not very secure. Its better that
re-broadcasting the password, however, and shows you are taking precautions,
if someone tries to sue for damages.
I hope this helps.
- Roger -
- Original Message -
Fr
Would something like this help?
$i=1
while(my $line=)
{
chomp $line;
push @integer,$line; # push a scalar onto the array
print "Enter another integer, please: ";
last if ++$i>=10;
}
- Original Message -
From: "David Draley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
How about
> use strict;
> my @data = qw/ 1 2 3 4 5 9 /;
> my @sum = (0,0);
> map { $sum[$_%2 ] += $data[$_] } ( 1..$#data );
> print $sum[0];
... or sum such?
- Roger -
- Original Message -
From: "Curtis Poe" <[EMAIL PROTECTED]
itute; the \n is a newline character; the // contains
nothing, and achieves the removal; the g find all the occurrences;
The end result may not be what you want, hence the advice elsewhere to get
rid of carriage returns (\r).
Regards
- Roger -
- Original Message -
From: "Pirabakaran
Hi
I'm not sure why you want to look at /etc/fstab: why is it not sufficient to
recurse from '/'? Also, remember to skip /dev.
Cheers
- Roger -
- Original Message -
From: "Westlake, Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thur
Surely, if you have control of your directory structure, you can use
$ENV{DOCUMENT_ROOT}. There is no absolutely general solution, and you must
be aware of what virtual hosting may do to your path.
- Roger -
- Original Message -
From: "Robert Bunn" <[EMAIL PROTECTED]
Anything in the cgi-bin (or similar) directory is assumed to be an
executable script. If it is a perl script (starts with #!//perl),
then perl gets called. The interpreter then runs as a separate process. (You
can try `ps -efl` to see whats happening)
Does this help?
- Roger -
- Original
Just an aside, but what is the point of format => 'Application/msword' ?
Anyone can rename their file to look like '*.doc', and you can only
determine the file content when you have uploaded it ( at which point you
SHOULD check).
Regards
- Roger -
- Original Me
lose INPUT;
my $report = 'No matches found.';
if ($count) {$report = "Total numbers of matches : $count"}
print p($report),end_html;
[As a matter of logic, consider the split statement, and consider what it
returns if the pattern is at the beginning, or end, of the line. T
hink that).
>>Not for a total novice programmer (who shouldn't learn Perl first anyway),
...
>> A person new to ALL programming should NOT buy this book ...
If you want to learn programming, I can only recommend 'Algorithms + Data
Structures = Programs' by Niclaus Wirth (out
and then construct a loop to check them all.
Of course, such checking is more efficiently done in Javascript on the
client machine, and there are many such scripts. However, you still need to
validate the parameters, in case the client has suppressed or violated the
Javascript.
Regards
- Ro
[ Please reply to the group, or else the thread loses its cohesion. RCH]
I trust you are aware of http://www.perl.com/pub/q/FAQs. If these are
incomprehensible to newbies, please post to this group, and say what you
don't understand. If the FAQs are no good, they need revision.
-
What sort of database engine are you using? If this has an SQL interface,
you would write something like
select age from tablename where name='zzz';
... and you would post the query to an SQL group.
See recent 'very funny' discussion: this is not a perl query.
- Rog
users of the script. I
look with interest to the more learned answers to your query.
- Roger -
- Original Message -
From: "Ryan Davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 10:00 AM
Subject: Cookies and Security
Hey all,
I hav
elphi, ..., but I can't see how to do
it in Perl
3... and so on
They could bang their classification at the beginning of the subject line,
and we could see what to answer.
[ Any without such a prefix will get answered very slowly! ]
- Roger -
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I recommend you test your program from the command line first. When it works
from the command line, find an iplanet newsgroup for advice on iplanet.
- Original Message -
From: "nila devaraj" <[EMAIL PROTECTED]>
To: "Hal Wigoda" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, J
You have
> foreach my $name ( $cgi->param )
> {print "$name\t" . $cgi->param( $name ) . "\n";
> }
You have to be careful with CGI::param; it returns a scalar for a scalar,
and an arrayref for a list.
May I suggest something like
my %params = $cgi->Vars;
foreach (keys %params)
{
my $para
7;Why not CGI.pm?'
Beginners will wish to learn to use this module; it is highly thought of.
I looked for HTML::Template in Active State, and again in CPAN, with no
luck.
Incidentally, I noticed that you are making a new database connection each
time you call cgi->new. Do you intend this, an
MySQL, Apache and Perl are all available for Windows. I do a fair amount of
such stuff on Windows (but don't tell my Linux freinds).
You shouldn't need a C compiler, but I too would like to know of a
free/shareware one; I last used Topspeed under DOS.
- Roger -
- Original Message
hod. I
accept that one might implement one class, or several classes, within a
module.
Regards
- Roger -
- Original Message -
From: "fliptop" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 13, 2001 5:51 AM
Subject: beginner's addressbook tut
#!/.../perl
to
#!/.../perl --
That is, put two minus signs on the end.
Regards
- Roger -
- Original Message -
From: "Sally" <[EMAIL PROTECTED]>
To: "perlcgi" <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 9:54 AM
Subject: FW: mystery
>
>
> -Or
hile (my $arrayref=$sth->fetchrow_arrayref){
my ($name,$extno,$dnis,$cli,$acd)=@$arrayref;
.
.
.
}
May I recommend you acquire ActivePerl from www.activestate.com: even if you
don't use it, the documentation is an excellent ready reference. (If the
module doesn't seem to be docu
database (for tidiness)
Where are you stuck?
- Roger -
- Original Message -
From: "Derek Harding" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 13, 2001 9:35 AM
Subject: MS SQL Server access
> Hi,
>
> I wonder if anyone can help please.
&
What it means is:-
Your script crashed before finishing making a page. If you are using CGI.pm,
plant 'end_html;exit;' at various places through your script until it
generates something legible. The error can be located that way.
BTW, I endorse the fatalsToBrowser recommendation
re of them
# $/ == endofline
- Roger -
- Original Message -
From: "Bruno Veldeman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 09, 2001 9:07 PM
Subject: Regex question
> Hi,
>
> I can't seem to get the regex right for this:
>
> I
I have found the series of articles, eg
http://www.oreillynet.com/pub/a/network/2001/05/18/perl_redflags.html
to be most helpful for such problems
- Roger -
- Original Message -
From: "Teresa Raymond" <[EMAIL PROTECTED]>
To: "beginnerperllist" <[EMA
53 matches
Mail list logo