in reply to Printing ten characters succeeding a matching string

bluray:

Look at the "Capture Buffers" section of perldoc perlre and you'll see how to do it. Here's a quick example:

$ cat foo.pl my $t='the quick red fox jumped over the lazy brown dog.'; if ($t=~/fox(.{10})/) { print "The 10 characters after fox are '$1'\n"; } $ perl foo.pl The 10 characters after fox are ' jumped ov'

...roboticus

When your only tool is a hammer, all problems look like your thumb.