print pos($str); #line6 while ($str=~/.\G/g) { print $&; }