[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] FindBin results in MPW vs MacPerl app



I'm having some difficulties using FindBin, in that behaves differently
depending on how I run the script that launches it. I made a very simple
test script to what's going on:

  use FindBin qw($Bin);
  print "Bin is: $Bin";

Let's say the full path to this script is
"MyVolume:PerlTest:FBtests:FBtest.pl".

Here is what I get when I run this script in different ways:

1) Running the script from the MacPerl application:
   Bin is MyVolume:PerlTest:FBtests

2) From MPW, running the script using the fully qualified path, as in: 
"perl MyVolume:PerlTest:FBtests:FBtest.pl":
   Bin is MyVolume:PerlTest:FBtests

3) From MPW, setting the working directory to "MyVolume:PerlTest:FBtests"
and running the script using the command line "perl FBtest.pl":
   Bin is MyVolume:PerlTest

Why does FindBin leave off the last part of the directory path in this last
case? Is there any way to make FindBin consistent?

many thanks in advance,
Tom Sackett
Seattle, Washington, USA
tsackett@adobe.com

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org