Currently I am splitting the string on "\" and reconstructing it without the last array element. Surely there is a better way.
Indeed there is, use File::Basename, and thy foot shall step upon the path of goodly ways.
### ... sample snippet ... my ($basename,$path,$extension) = File::Basename::fileparse($fullpath,qw(.txt));
In reply to Re^3: rename and create directories
by dimar
in thread rename and create directories
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |