or $bla=~/([^\/]+)$/; in case the filenames have non-alpha chars or more dots...

Tom Schindl wrote:

on the other hand:

my $bla = "/dir/subdir/file.ext";

$bla =~ /(\w+\.\w+)$/;
print $1 . "\n"; # file.ext

works perfectly

Reply via email to