Re: Loop Runners

2004-01-21 Thread John W. Krahn
Amit Phatak wrote: > > To run through a loop there more than one ways (a lot actually!) in PERL. It is Perl for the language and perl for the interpreter but never PERL. > The ones I'm aware of are: To run through @array > > #1 > $size = @array; > for($i=0;$i<$size;$i++) > { >print "$arra

Re: Loop Runners

2004-01-20 Thread Dan Anderson
> Can people please contribute on other ways to do the same thing. Please begin by > #3, #4.. etc as you read on different ways. use strict; use sub; my @a = @ARGV; my @array = @a; # 1 while (scalar (@array)) { my $element = shift (@array); main::process($element); } @a = @ARGV; #2 main: