while ($s =~ /abc/g) { print "found abc at $-[0]\n"; }