On Thu, 2005-01-27 at 13:10, Mallik wrote: > Hi, > > Thanks for ur reply. > > Is there any function instead of looping thru entire array. > > Mallik. >
You can do fancy stuff like below, but this may not be necessarily better. Can you post where you are trying to use this ? What is there is more than one match ? ... ... my $i=0; grep { /^pqr$/ && print $i ; $i++ } @arr; Bye Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>