in reply to How can I get the file name

A simple regex will do it
my $value = "/home/image/office.iso"; my($fullname, $filename) = $value =~ m< / ( ( [^/]+ ) \. .* ) \z >x; print "fullname - $fullname\nfilename - $filename\n"; __output__ fullname - office.iso filename - office
Or if you're expecting to port the code, File::Spec is the way to go
use File::Spec::Functions 'splitpath'; my $value = "/home/image/office.iso"; my($fullname,$filename) = (splitpath $value)[-1] =~ m< ( ([^\.]+) \. .*) >x; print "fullname - $fullname\nfilename - $filename\n"; __output__ fullname - office.iso filename - office
See. perlre and File::Spec::Functions for more info.
HTH

_________
broquaint