Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: $0 inconsistency?

by Perlbotics (Archbishop)
on Apr 13, 2022 at 17:59 UTC ( [id://11142963]=note: print w/replies, xml ) Need Help??


in reply to $0 inconsistency?

Sometimes, this is useful like ($me) for usage info (usage: $me [ARGS]).

use strict; use warnings; use Path::Tiny (); my $me = Path::Tiny::path( $0 )->basename(); my $abs_me = Path::Tiny::path( $0 )->realpath(); print "1) original: $0\n"; print "2) short : $me\n"; print "3) long : $abs_me\n";

Result:

rp@linux:local: perl ../me.pl 1) original: ../me.pl 2) short : me.pl 3) long : /home/rp/me.pl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142963]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found