On Thu, Jan 16, 2003 at 03:21:13PM -0800, Liss, Mike wrote: > Is there an easy way to get the location of a specific instance of a > character in an array? > > for example: > > $MyArray = "This is the test"; > > I would like to know the index of the first occurence of the letter "h" ( 1 > )
Surprisingly, the function you want is called C<index>. :-) my $i = index $MyArray, "h"; -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]