in reply to Isolating a file name

use strict;

print $1 if ($s =~ /.(\w+).(\w+)$/g);