Re: print flips to scientific notation when integer exceeds 15 decimal digits

2009-11-05 Thread David Lee
Philip Potter wrote: 2009/11/4 David Lee : [...] Anyway, your explanation was useful and gives us sufficient to decide how to address our local use of these numbers. (In our case, they are human-oriented accumulated byte-counts, for which we don't actually need that significance/precision.)

DBI escape_string

2009-11-05 Thread cerr
Hi There, On http://www.codepedia.com/1/PerlDBITutorial I found that prepare() would escape a string. Now I have a query like this: "INSERT INTO logs (source, date, time, program, msg, inserttime) VALUES ('NovaxPRG-T0029', '2009-11-02', '09:51:11', 'NovaxPRG', 'NovaxPRG [931]: T0029: CRITICAL: cou

Re: DBI escape_string

2009-11-05 Thread jm
your last field included in the query ('msg') has an apostrophe in the middle of the text, as well as not be closed with a single quote before the entire string is closed with the double quote. you can't include an unescaped single quote inside a single-quoted string, nor can you include an unesca

Re: tried to install my first module (Mac OSX 10.4.11)

2009-11-05 Thread Dr.Ruud
tom smith wrote: Ok, I tried to install List::MoreUtils using CPAN, but it didn't work. Much easier: http://www.macports.org/ -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: SFTP under Windows?

2009-11-05 Thread Octavian Râşniţă
From: "Parag Kalra" Just did Googly and found this - http://search.cpan.org/~drolsky/Net-SFTP-0.08/lib/Net/SFTP.pm Hope it helps... Cheers, Parag Thank you. I know about it but I couldn't make it work under Windows. Does anyone if it can be used under this OS? Thanks. Octavian -- To unsubscr

__DATA__ in command line

2009-11-05 Thread 兰花仙子
Hello, doesn't one-liner Perl command support __DATA__ handler? Just found this: # perl -e 'while(){ print } > __DATA__ > abc > 123 > def > ' run without any output. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

Re: __DATA__ in command line

2009-11-05 Thread John W. Krahn
À¼»¨ÏÉ×Ó wrote: Hello, Hello, doesn't one-liner Perl command support __DATA__ handler? No. It only works in an actual file located on a real file system. Just found this: # perl -e 'while(){ print } __DATA__ abc 123 def ' run without any output. You could always do it like this:

Re: __DATA__ in command line

2009-11-05 Thread Shawn H Corey
兰花仙子 wrote: > Hello, > > doesn't one-liner Perl command support __DATA__ handler? > Just found this: > > # perl -e 'while(){ print } >> __DATA__ >> abc >> 123 >> def >> ' > > run without any output. > $ perl -MO=Deparse -e 'while(){ print } >> __DATA__ >> abc >> ' while (defined($_ = )) {

Re: __DATA__ in command line

2009-11-05 Thread 兰花仙子
OK thank you both, I got it. 2009/11/6 Shawn H Corey : > 兰花仙子 wrote: >> Hello, >> >> doesn't one-liner Perl command support __DATA__ handler? >> Just found this: >> >> # perl -e 'while(){ print } >>> __DATA__ >>> abc >>> 123 >>> def >>> ' >> >> run without any output. >> > > > $ perl -MO=Deparse -

must satisfy _unknown_ number of regexp patterns

2009-11-05 Thread Michael Alipio
Hi, if I have a script that accepts any combination of the 5 or maybe even more options, say, option1, option2, option3... Now, after collecting the options, for each option, there is a corresponding regexp pattern. I will then build an if statement, where the test should be, all the options

Re: must satisfy _unknown_ number of regexp patterns

2009-11-05 Thread Robert Wohlfarth
On Thu, Nov 5, 2009 at 11:26 PM, Michael Alipio wrote: > if I have a script that accepts any combination of the 5 or maybe even more > options, say, option1, option2, option3... > > > Now, after collecting the options, for each option, there is a > corresponding regexp pattern. I will then build

Optimizing File handling operations

2009-11-05 Thread Parag Kalra
Hey Folks, I Frequently use perl to process 2 files line by line. Most of the times I compare two files line by line and check if one line is same to corresponding line of other file, or if one line is substring of other line etc and many more operations. The technique which I generally use is t

Re: must satisfy _unknown_ number of regexp patterns

2009-11-05 Thread John W. Krahn
Michael Alipio wrote: Hi, Hello, if I have a script that accepts any combination of the 5 or maybe even more options, say, option1, option2, option3... Now, after collecting the options, for each option, there is a corresponding regexp pattern. I will then build an if statement, where the t

Re: Optimizing File handling operations

2009-11-05 Thread John W. Krahn
Parag Kalra wrote: Hey Folks, Hello, I Frequently use perl to process 2 files line by line. Most of the times I compare two files line by line and check if one line is same to corresponding line of other file, or if one line is substring of other line etc and many more operations. The techn

Re: Optimizing File handling operations

2009-11-05 Thread Jim Gibson
At 11:40 AM +0530 11/6/09, Parag Kalra wrote: Hey Folks, I Frequently use perl to process 2 files line by line. Most of the times I compare two files line by line and check if one line is same to corresponding line of other file, or if one line is substring of other line etc and many more opera