;-)my @arr = qw(cat dog pig horse donkey); for my $line (@arr) { my $index = (1=~//..1=~/0/)-1; print "$index = $line\n"; }
In reply to Re: Foreach Loops
by Roy Johnson
in thread Foreach Loops
by hubb0r
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |