my $i = 0; foreach my $scalar (@array) { print $scalar, " is at position ", $i++, "\n"; }
--
John.
In reply to Re: find the element position of $scalar
by jmcnamara
in thread find the element position of $scalar
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |