This also works with file name comes without path. Read the documentation, there are many things you can do with this very useful module.use File::Basename; my $name = basename($file_with_path2,'.out','.some_other_ext'); print "$name\n";
In reply to Re: Capturing Base Name of a File With or Without Path
by monkfan
in thread Capturing Base Name of a File With or Without Path
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |