I have a problem on a web form. The form is passing a variable to either a full or relative path on the system. If the path doesn't exist the I need to create the dir (after some checking, etc) so that a file can be uploaded to it.
So the called to filename and basename will not work since they expect existing valid paths.
I was thinking that something like:
my $dirpath = $setpath;
$dirpath =~ s/\/(.*?\/)//;
would just remove the file name and leave me with the dir. But alas it just returns the string. :(