Also core module File::Spec and notably the splitpath function can be useful
($volume,$directories,$file) = File::Spec->splitpath( $path );
Then you need to manage the extension of the file with a regex or as you have done already.
L*
In reply to Re: Extract main name of file
by Discipulus
in thread Extract main name of file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |