> 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::process( $i ) for my $i (@a); @a = @ARGV; #3 main::process( $i ) foreach my $i (@a); @a = @ARGV; #4 main::process(shift (@a)) while (scalar (@a)); sub process { # do what needs to be done } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>