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

[MacPerl] $0 oddity



Consider:

#!perl
$me = $0;
print "\$0 is '$0'\n";
print "\$me is '$me'\n";
$0 =~ s/.*://;
$me =~ s/.*://;
print "\$0 is '$0'\n";
print "\$me is '$me'\n";

If I save this in the file 'name test.pl' on the desktop then run it, I get:

$0 is 'Macintosh HD:Desktop Folder:name test.pl'
$me is 'Macintosh HD:Desktop Folder:name test.pl'
$0 is 'name te'
$me is 'name test.pl'

The third line appears incorrect.

This is under the regular app. 68k version of 5.1.5r4 on an 840AV, but I
think it's been around a while.

Brian



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