On May 11, Zapp (Zapp) wrote:
Does anyone has a better idea?
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use Cwd qw(getcwd);
my $cwd = getcwd();
print map { -e "$cwd/$_" ? "$cwd/$_\n" : "$_\n" } @ARGV;
Or use rel2abs in the core File::Spec module.
--
Magnus Woldrich
On 12-05-11 05:14 AM, Zapp wrote:
> Does anyone has a better idea?
Yes, use Cwd::realpath() See `perldoc Cwd` for details.
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
[updated for today's programming]