in reply to Capturing Base Name of a File With or Without Path
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing Base Name of a File With or Without Path
by chargrill (Parson) on Jan 26, 2006 at 07:12 UTC |