Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: $0 inconsistency?

by Perlbotics (Bishop)
on Apr 13, 2022 at 17:59 UTC ( #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? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2023-03-31 02:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?