in reply to find the element position of $scalar
or, shorter:my $i=0; foreach $scalar(@array) { print("$scalar is $i element\n"); $i++; }
my $i=0; for(@array) { print("$_ is $i element\n"); $i++; }
The white hole.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: find the element position of $scalar
by Anonymous Monk on Feb 08, 2002 at 09:06 UTC |
In Section
Seekers of Perl Wisdom