I was just going to write that...
I use File::Basename all the time for filename splitting. Hasn't failed me yet and heres how you do your bit.
use strict;
use File::Basename;
my $file = '/ftp/dest/id.ext';
my ($name, $path, $suffix);
my @suffixes = ('.ext'); # Extra extensions can be added to the list.
($name, $path, $suffix) = fileparse($file, @suffixes);
Coffee, KitKat, and a new script to write. It's gonna be a good day.... | [reply] [Watch: Dir/Any] [d/l] |
Thanks,
James Mastros,
Just Another Perl Initate | [reply] [Watch: Dir/Any] |