Re: After "Beginning Perl"?

2003-09-01 Thread David Wall
--On Monday, September 01, 2003 2:53 PM -0700 "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: "Trent" == Trent Rigsbee <[EMAIL PROTECTED]> writes: Trent> Hi! I've completed "Beginning Perl" by Simon Cozens. What do you Trent> recommend as my next book? I'd like to tackle "Networking Programming T

Reverse Order?

2003-09-01 Thread Mark Weisman
I read a text file into HTML for viewing through a webpage, fairly straight forward. Open (INFILE, "; Close(INFILE); Foreach my $rec (@array) { chomp($rec); ($a,$b) = split(/\|/,$rec); print "$a - $b\n"; }; This code simply reads the text file, and populates it to the scre

Apache Log files and MySql

2003-09-01 Thread Mame Mbodji
How to I go about feeding my Apache Logs (Access, referer...) to a mysql table without having to do it at the command line. I want the process to be automatic. Everytime there is a log entry it should go to the mysql table as well. Is there a way of connecting them automatically. Thanks -- To

new, exciting error message III

2003-09-01 Thread Nestor, John
A couple of days ago, I sent in some code with an error message: Can't find unicode character property definition via main->a or a.plFile 'unicode/Is/a.pl'; Line 0 As it turns out, the code sample I included was not the cause of the problem, apparently. However, if I comment out the following lin

Re: After "Beginning Perl"?

2003-09-01 Thread Randal L. Schwartz
> "Trent" == Trent Rigsbee <[EMAIL PROTECTED]> writes: Trent> Hi! I've completed "Beginning Perl" by Simon Cozens. What do you Trent> recommend as my next book? I'd like to tackle "Networking Programming Trent> with Perl" by Lincoln Stein or "Win32 Perl Scripting" by Roth but I'm Trent> not s

Conditional statement and param()

2003-09-01 Thread B. Fongo
Hello Below is a portion of a script that displays a table. The argument passed by param() determines the number of rows the table should display. For some unknown reason, the value of param() seem to behave strangely. It at times the value does not change; even if a different number is sent as

RE: cutting a string

2003-09-01 Thread Danny Miller
As long as the format of what you want (file.txt) remains the same you could do the following: ($stuffattheend) = $string =~ /\/(\w+\.\w+)$/; Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, September 01, 2003 11:41 AM To: Perl Beginners Subject:

Re: cutting a string

2003-09-01 Thread Rob Anderson
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is the function of cutting a string from a point until the last character? > > For example > $string="C:/progra~1/directory1/directory2/file.txt"; > > i want to find the last backslash (/) of the string and keep the sequence > foll

cutting a string

2003-09-01 Thread sc00170
What is the function of cutting a string from a point until the last character? For example $string="C:/progra~1/directory1/directory2/file.txt"; i want to find the last backslash (/) of the string and keep the sequence following it (file.txt) Is it simple? I tried with the split function but

Re: taint mode for cgi script

2003-09-01 Thread Bob Showalter
Jenda Krynicky wrote: > From: "Bob Showalter" <[EMAIL PROTECTED]> > > Vic wrote: > > > I wanna ask when running Apache 2.046 under Windows XP with > > > mod_cgi, how can I turn on the taint mode for the Perl > > > interpretor? (i guess the shebang line wont work since windows > > > nvr look at them

Testing.....

2003-09-01 Thread Mame Mbodji
Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: -w vs. use warnings

2003-09-01 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Morbus Iff) writes: >"use warnings" only exists in Perl 5.004_05 or later. If you want your >scripts to work in Perl interpreters earlier than that (the still prevalent >5.004_04), then you'll need to use "-w". Note: I may be slightly "what crack

Re: extra '1' returned while "building a horse"

2003-09-01 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Paul Johnson wrote: > > Kevin Pfeiffer said: [...] >> You'll see there is a "1" after the 'speak' routine's output (each time). >> I can't see where the "1" comes from. > > Your speak method prints something and returns true if it is successful > (the print being

Re: who to define a function in run time

2003-09-01 Thread Paul Johnson
[EMAIL PROTECTED] said: > if you do: > perl -e '$a="beta"; *$a=sub{print("xxx")}; beta()' > works and print "xxx" > > if you do: > perl -e 'use strict; my $a="beta"; *$a=sub{print("xxx")}; beta()' > don't works > > Who do I resolve this problem Don't use strict. Or more specifically, don't use

who to define a function in run time

2003-09-01 Thread Marcos . Rebelo
if you do: perl -e '$a="beta"; *$a=sub{print("xxx")}; beta()' works and print "xxx" if you do: perl -e 'use strict; my $a="beta"; *$a=sub{print("xxx")}; beta()' don't works Who do I resolve this problem Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: extra '1' returned while "building a horse"

2003-09-01 Thread Paul Johnson
Kevin Pfeiffer said: >sub speak { > my $either = shift; > if (@_) { # something to say >my $dialogue = shift; >print $either->name, " says, \"$dialogue\"!\n"; > } else { >print $either->name, " goes ", $either->sound, "!\n"; > } >

extra '1' returned while "building a horse"

2003-09-01 Thread Kevin Pfeiffer
>From "Learning PO, R & M", chap. 9: Following along in the book (more or less faithfully) I now have: #!/usr/bin/perl use warnings; use strict; { package LivingCreature; sub new { my $class = shift; my $name = shift; bless \$name, $class; } sub name { my $either

Re: sending interrupt

2003-09-01 Thread zsdc
[EMAIL PROTECTED] wrote: On Thu, 28 Aug 2003, Ramprasad A Padmanabhan wrote: Which OS? On Unix like systems, You can find the PID of the script and send the signal on the shell like kill -15 $PID you could also do: killall -KILL name_of_application Don't do that on Solaris... Its version of ki

Re: taint mode for cgi script

2003-09-01 Thread Jenda Krynicky
From: "Bob Showalter" <[EMAIL PROTECTED]> > Vic wrote: > > I wanna ask when running Apache 2.046 under Windows XP with mod_cgi, > > how can I turn on the taint mode for the Perl interpretor? (i guess > > the shebang line wont work since windows nvr look at them anyway.) > > No. Perl will parse the

After "Beginning Perl"?

2003-09-01 Thread Trent Rigsbee
Hi! I've completed "Beginning Perl" by Simon Cozens. What do you recommend as my next book? I'd like to tackle "Networking Programming with Perl" by Lincoln Stein or "Win32 Perl Scripting" by Roth but I'm not sure if I'm ready for these. Should I go for something like "Learning Perl" or "Progr

Re: taint mode for cgi script

2003-09-01 Thread Bob Showalter
Vic wrote: > Hi. > I am new to perl so hope u wont flame me for asking sth stupid =) What does "sth" mean? > > I wanna ask when running Apache 2.046 under Windows XP with mod_cgi, > how can I turn on the taint mode for the Perl interpretor? > (i guess the shebang line wont work since windows nvr