in reply to Should -f test return true for symlinks ? [RESOLVED]
I agree that the Perl document does not explicitly state the behavior in this case. But, you could test if it is both a file and a link:
$ perl -e 'printf "%d%d%d%d%d\n", -f "file", -f "link", -l "file", -l +"link", -f "link" and -l "link"' 11011
Caution: I haven't tested all the combos of files/dirs/links, etc.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Should -f test return true for symlinks ?
by Bloodnok (Vicar) on Oct 23, 2013 at 14:13 UTC |
In Section
Seekers of Perl Wisdom