On 28/11/2011 15:03, Ramprasad Prasad wrote:
I have an array of scalars.I want to run a loop like this my @workers = qw ( a b c ); my $MAXCHILD = 20; foreach my $i( 0 .. $MAXCHILD){ run_job($i,$workers[$i++]); } Can I do this ?
Take a look at Array::Iterator, which has an Array::Iterator::Circular class. <http://search.cpan.org/~sharyanto/Array-Iterator/lib/Array/Iterator/Circular.pm> Rob -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
