Hi ,

Say I have an array in perl,

@list = ("a=3", "b=5", "c=8", "d=9", "e=2", "f=0");

Now I want to find the index of the element "d=9" ( Index of d=9 is 3 here , as
we all know ).

How do we do that ??

In perl what I can find that there exist a function "index", which returns
position of the substring in string..........like,

$c = index(@list, "d" );

This function will return me the value 13 or 12 perhaps....as the substring
"d=9" begins from 13th position in the @list.

My requirment is :

$c = some_func(@list, "d"); .............where some_func should return me
3......... Can anybody help me.

TIA,
-Mini.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to