in reply to My favorite looping mechanism in Perl is:
If I want to go through an array I do:
I also don't use $_ to get the contents of a file. I do this:for ($i = 0; $i<=$#array; $i++) { stuff; };
And I put ; at the end of every line..while ($line = <FILE>) { stuff; };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: RE: My favorite looping mechanism in Perl is:
by BrentDax (Hermit) on Jul 06, 2001 at 10:20 UTC | |
by Anonymous Monk on Jun 24, 2012 at 17:02 UTC | |
by jdporter (Paladin) on Jun 25, 2012 at 00:35 UTC | |
by sauoq (Abbot) on Jun 25, 2012 at 21:29 UTC | |
by Anonymous Monk on Jun 25, 2012 at 13:54 UTC |