Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Overloading Weirdness

by Athanasius (Archbishop)
on Jun 24, 2018 at 04:11 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found