jd wrote:

> Is there any reliable, cross-platform way to find out not the current
> working directory, but rather the path to the executing script? FindBin
> appears to be useless for this (seems to report the directory the script
> has been launched from), and $0 omits path on some platforms.
> 
> Surely it can't be that hard to find out from Perl where the
> scriptfile actually lives, no matter where it's being executed from?

A little hasty on my reply, you're right about $0, but findbin should
work for this:

use FindBin qw($RealDir);
print "$RealDir\n";

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to