http://qs321.pair.com?node_id=1059307


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

$ perl -e 'printf "File test: file %d f_link %d dir %d d_link %d\n" , +-f "file" , -f "f_link", -f "dir", -f "d_link"; ' File test: file 1 f_link 1 dir 0 d_link 0 $ perl -e 'printf "Dir test: file %d f_link %d dir %d d_link %d\n" ,- +d "file" , -d "f_link", -d "dir", -d "d_link"; ' Dir test: file 0 f_link 0 dir 1 d_link 1
So it would appear that the symlink is followed by the test ...

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."