Hi,
I an trying to obtain the full directory of a passed file to a perl script (NT platform).
If the passed file is provided with a full directory, eg: C:\scripts\perl.pl X:\transfer\foo.txt, I suppose I could split on "\" and manipulate this data.
But if the perl script is located in X:\transfer, then the path name would not be included in the passed file name, eg: X:\transfer\perl.pl foo.txt.
I've tried File::Basename; standad module, but this only returns a relative path.
use File::Basename;
$path = dirname($ARGV[0]);
Value for $path is .
I don't know where to look anymore. Does somebody have an idea?
I an trying to obtain the full directory of a passed file to a perl script (NT platform).
If the passed file is provided with a full directory, eg: C:\scripts\perl.pl X:\transfer\foo.txt, I suppose I could split on "\" and manipulate this data.
But if the perl script is located in X:\transfer, then the path name would not be included in the passed file name, eg: X:\transfer\perl.pl foo.txt.
I've tried File::Basename; standad module, but this only returns a relative path.
use File::Basename;
$path = dirname($ARGV[0]);
Value for $path is .
I don't know where to look anymore. Does somebody have an idea?