in reply to character location question

Hmm, i think :
my $s = "hello world, kill bill" ; print pos $s, " " while $s =~ /ll/g
... does almost what you want :)
It returns : 4 17 22
Maybe you need to substract the length of the string you locate ?

Hope this helps,

zlr

Replies are listed 'Best First'.
Re^2: character location question
by EchoAngel (Pilgrim) on Mar 11, 2005 at 16:32 UTC
    thanks!