Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Cwd's abs_path not working with filetests?

by Eliya (Vicar)
on Nov 26, 2013 at 11:28 UTC ( #1064393=note: print w/replies, xml ) Need Help??


in reply to Re^2: Cwd's abs_path not working with filetests?
in thread Cwd's abs_path not working with filetests?

but isn't this kinda defeating a purpose of abs_path()?

I think you've misunderstood the purpose of abs_path(). It resolves any symlinks along the given path and returns the canonicalized "absolute" path with all symlinks removed (see also "man realpath").

If you give it a relative path, it assumes it's relative to the CWD (as usual), not to whatever readdir() is currently processing...

Replies are listed 'Best First'.
Re^4: Cwd's abs_path not working with filetests?
by Anonymous Monk on Nov 26, 2013 at 12:17 UTC
    Yeah, you're right. I thought abs_path is an easy way out for arbitrary filetesting. Well, I was wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1064393]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-06-23 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (125 votes). Check out past polls.

    Notices?