Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Overloading Weirdness

by Athanasius (Archbishop)
on Jun 24, 2018 at 04:11 UTC ( #1217312=note: print w/replies, xml ) Need Help??


in reply to Re^2: Overloading Weirdness
in thread Overloading Weirdness

Hello ikegami,

Thanks for that! I had a hard time trying to think of a situation in which the current working directory would be different to the script’s directory (in the absence of explicit calls to chdir, of course). Finally, the penny dropped: if I invoke a script foo/bar/baz.pl from the foo directory:

perl bar/baz.pl

the script’s directory is foo/bar, but the current working directory is still foo!

Thanks again,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^4: Overloading Weirdness
by ikegami (Patriarch) on Jun 24, 2018 at 23:12 UTC

    Yes, relpath/prog[1] and /abspath/prog[2], but even just prog[3]

    1. If relpath doesn't refer to the CWD.
    2. If /abspath doesn't refer to the CWD.
    3. If the $PATH entry used doesn't refer to the CWD.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-01-29 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (74 votes). Check out past polls.

    Notices?