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
 m...@japh.se, woldr...@cpan.org
 irc: scp1 on freenode
 uri: http://japh.se

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to