in reply to Capturing Base Name of a File With or Without Path

Maybe I should be fully awake and sober for the following, but this should at least get you on your way:
sub get_basename { my $basename; my $fullname = shift; $fullname =~ m/.*\/(\w+)\.\w+/; $basename = $1; return $basename; }
If "somename" could contain more than \w provides, then YMMV.
--chargrill
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );