in reply to Displaying the column number when reading a file
Use index:
my $str = 'this is some text'; print index $str, 'o'; __END__ 9 [download]
-- David Serrano