Perl maximum execution time

2008-04-11 Thread Keenlearner
Hello, I have had been programming in PHP for a while, new to perl. I got a perl code bug where it will go to infinite loop. So is there a maximum execution time that I could set in perl just like in PHP ? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: Please let me know where can I find practice exercises

2008-04-11 Thread Vijayshree
On Apr 10, 2:56 pm, [EMAIL PROTECTED] (Hemanth) wrote: > Hi, > > I am currently learning perl programming. Please help me by giving > some practice exercises or direct me to the site where i can find > them. > > Thanks in Advance! > > Hemanth Hi Hemanth, You can solve list of questions from site

Re: Perl maximum execution time

2008-04-11 Thread Chas. Owens
On Thu, Apr 10, 2008 at 9:25 PM, Keenlearner <[EMAIL PROTECTED]> wrote: > Hello, I have had been programming in PHP for a while, new to perl. I > got a perl code bug where it will go to infinite loop. So is there a > maximum execution time that I could set in perl just like in PHP ? > Thanks sni

Re: Best way to grab lines n thru x of a file

2008-04-11 Thread Peter Scott
On Thu, 10 Apr 2008 16:35:14 -0400, Jonathan Mast wrote: > perl -ne 'print if 20 .. 50' file looks perfect but I totally don't > understand it perldoc perlop: In scalar context, ".." returns a boolean value. The operator is bistable, like a flip-flop, and emulates the line-rang

Re: how to globalize a lexical variable inside a sub routine

2008-04-11 Thread Peter Scott
On Fri, 11 Apr 2008 00:23:12 +0200, Jenda Krynicky wrote: > Something like > > ... > { > my $cnt; > sub inc { > return ++$cnt; > } > } > > print inc(),"\n"; > print inc(),"\n"; > print inc(),"\n"; Just to put in a plug for the modern conveniences of Perl 5.10: us

Re: Please let me know where can I find practice exercises

2008-04-11 Thread hemanth
On Apr 11, 11:46 am, [EMAIL PROTECTED] (Vijayshree) wrote: > On Apr 10, 2:56 pm, [EMAIL PROTECTED] (Hemanth) wrote: > > > Hi, > > > I am currently learning perl programming. Please help me by giving > > some practice exercises or direct me to the site where i can find > > them. > > > Thanks in Adva

Writing hexa in ascii

2008-04-11 Thread [EMAIL PROTECTED]
Hi all, I want to read a serial comm port receiving hexa data. Then i would like to print these data in ascii, i mean if i receive 0x41, i would print "41" not the character "A". I try with the pack function but it doesn't work (surely because i don't understand this function) Have you any id

RE: Writing hexa in ascii

2008-04-11 Thread Bob McConnell
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 11, 2008 10:28 AM To: beginners@perl.org Subject: Writing hexa in ascii Hi all, I want to read a serial comm port receiving hexa data. Then i would like to print these data in ascii, i mean if i rec

Re: Debugger in PErl

2008-04-11 Thread jeevs
Thanks for the pointer Jenda And Chas.. A little problem here... I was able to debug a sample script from command line... However when i used the !#c:/perl5.10/bin/perl.exe -d:pktdb to debug cgi scripts through browser nothing happens and the script just does nothing except throwing the problem

Re: Writing hexa in ascii

2008-04-11 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > Hi all, > I want to read a serial comm port receiving hexa data. > Then i would like to print these data in ascii, i mean if i receive 0x41, i > would print "41" not the character "A". > > I try with the pack function but it doesn't work (surely because i don't > unde

Re: Best way to grab lines n thru x of a file

2008-04-11 Thread Randal L. Schwartz
> ""Jonathan" == "Jonathan Mast" <[EMAIL PROTECTED]> writes: "Jonathan> The line numbers are 4million to 4million + some odd hundred thousand, just "Jonathan> to give an idea of the size. Sounds like you want a database, not a flat file. Time to migrate. -- Randal L. Schwartz - Stonehenge

Re: Writing hexa in ascii

2008-04-11 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: I want to read a serial comm port receiving hexa data. Then i would like to print these data in ascii, i mean if i receive 0x41, i would print "41" not the character "A". Check out the FAQ entry perldoc -q numeric -- Gunnar Hjalmarsson Email: http://www.gunnar.cc

Re: Perl maximum execution time

2008-04-11 Thread Dr.Ruud
"Chas. Owens" schreef: > On Thu, Apr 10, 2008 at 9:25 PM, Keenlearner <[EMAIL PROTECTED]> wrote: >> Hello, I have had been programming in PHP for a while, new to perl. I >> got a perl code bug where it will go to infinite loop. So is there a >> maximum execution time that I could set in perl ju