in reply to Re^2: Seeking the longest string in an array
in thread Seeking the longest string in an array

change $data[0] =~ /\Q$_\E/ to index($data[0], $_).

Should be faster.

Replies are listed 'Best First'.
Re^4: Seeking the longest string in an array
by ikegami (Patriarch) on Dec 12, 2004 at 05:56 UTC
    nope, won't work. He's doing case-insensitive searches.
      you're right, I missed that. But even index(lc($data[0]), lc($_)) should be faster than $data[0] =~ /\Q$_\E/i.