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

Re: [MacPerl] $0 and $]



Xah Lee <xah@best.com> writes:
>Perhaps this has been discussed before.
>
>When I run
>
> print $0;
>
>in MacPerl, I get the full path of the file name. But on both Linux and FreeBS
D boxes I tried, only the abbreviated path is given, e.g.:
>
> ./scriptName

I don't think the UNIX behaviour is identical across all Unices. The reason why
MacPerl gives a full path is that it has no reasonable notion of a "current
directory" on which to base relative paths as long as no script is running
(Once a script is started, the relative path is based on the location of the script).

>A second question. When I run print $] on my ISP server (FreeBSD), I get
>
>$RCSfile: perl.c,v $$Revision: 1.7.2.2 $$Date: 1998/03/12 19:27:47 $
>Patch level: 36
>
>what does that mean!? I was expecting someting like 5.004.

Numeric vs. string context. Try

print $]+0;

The distinction was dropped in Perl 5 (Note that the above indicates
perl4.036), presumably because RCS ids are not overly helpful for users.

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "Besides, we Satanists have enough PR problems without having to also
   distance ourselves from Scientology."
                   -- Hilary Osborne in <6hmdpq$bf5$1@isn.dac.neu.edu>

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch