Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Should -f test return true for symlinks ? (lstat)

by tye (Sage)
on Oct 23, 2013 at 15:00 UTC ( #1059314=note: print w/replies, xml ) Need Help??


in reply to Should -f test return true for symlinks ? [RESOLVED]

The documentation is clear, if you don't just skim parts of it. "-f $path" calls stat(). "-l $path" calls lstat(). So, "-f $path" will be true for a link to a file.

If you want -f to be false for a symlink, then you do "-f _" preceded by something that calls lstat(); that is, either "-l $path" or "lstat $path".

- tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-11-25 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?