Hi all,
I now have an array like this : @list = ('1234', '4567', '789A', 'BCDE', 'FGHI',
.....);
and now, I want to find where is the location of 'BCDE' in list , so I write like this
:
my @list = ('1234', '4567', '789A', 'BCDE', 'FGHI');
my $GetLocation = 0;
my $value = 'BCDE';
for (my $atLoc = 0; $atLoc <= $#list and ! $GetLocation ; $atLoc++)
{ $GetLocation = $atLoc if ($value eq $list[$atLoc]) }
ok, so $GetLocation is the result I want...
but any other smarter method ?
Rgds,
Connie
