Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: -s test option returns differently in some cases

by parv (Priest)
on Oct 14, 2013 at 11:25 UTC ( #1058172=note: print w/ replies, xml ) Need Help??


in reply to -s test option returns differently in some cases

Could the problem be due to use of auto mount of a NFS directory (given auto mount is actually being used)? For whatever reason, perhaps use of ls is more forceful than size or emptiness test. Then again both -- ls & -X -- get the information via stat call, no? Seems like something might have changed in perl + Suse combination.

Does calling stat() explicitly on file path (and not running system ls) before -[sz] make a difference?


Comment on Re: -s test option returns differently in some cases
Select or Download Code
Re^2: -s test option returns differently in some cases
by frogsausage (Sexton) on Oct 14, 2013 at 12:09 UTC

    Thanks for thinking of the NFS too. It seems something changed either in Perl 5.14.1 or in SuSE 11 with either the 'print' statement, the way test works on a filehandle, how the system deals with an open file...

    Thanks for your input :) I'm short of 'vote' but I will come back later!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-09-22 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls