Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: Finding out how you were called...

by rchiav (Deacon)
on Aug 07, 2001 at 00:57 UTC ( [id://102606]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Finding out how you were called...
in thread Finding out how you were called...

wierd.. I have RH 7.1 with bash (perl 5.61). Here's my test
#!/usr/bin/perl -w print " I was called as $0\n";
results as follows. tt is the original file. rr is a symlink in /usr/local/bin
[xxxx@yyy:/home/xxxx]$ tt I was called as ./tt [xxxx@yyy:/home/xxxx]$ rr I was called as /usr/local/bin/rr [xxxx@yyy:/home/xxxx]$

Replies are listed 'Best First'.
Re: Re: Re: Re: Finding out how you were called...
by suaveant (Parson) on Aug 07, 2001 at 04:37 UTC
    My bad... I was assuming perl's $0 and c's argv[0] were the same, which they are not... $0 does have exactly what I want, thanks...

                    - Ant
                    - Some of my best work - Fish Dinner

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://102606]
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: (3)
As of 2024-04-24 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found