pos SCALAR pos Returns the offset of where the last C search left off for the variable is in question (C<$_> is used when the variable is not specified). May be modified to change that offset. Such modification will also influence the C<\G> zero-width assertion in regular expressions. See L and L. #### pos() - length $& #### my $R = "foo bar quux baz"; while ($R =~ /ba.\b/g) { print pos($R) - length $&, "\n"; } #### 4 13