Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

File Test -A problem on SunOS 5.9 & perl 5.8.3

by zakzebrowski (Curate)
on May 25, 2004 at 13:33 UTC ( #356199=perlquestion: print w/replies, xml ) Need Help??

zakzebrowski has asked for the wisdom of the Perl Monks concerning the following question:


I've run into a strange file test problem. When I do a -A on a file, the return value is 0.0000 for the age of the file. That would be fine if the file was open and in use, but it's not in use, according to the command lsof. The uname -r -s returns SunOS 5.9 and Perl -V returns 5.8.3. The code worked fine on SunOS 5.8 under perl 5.6.1. Any ideas? BTW, -C and -M return resonable values... (Google and perlmonks (as far as I searched) returned no meaningfull results.)

UPDATE: It appears to be localized to the operating system, and is not a perl bug, special thanks to dave_the_m for localizing the problem!

Zak - the office

Replies are listed 'Best First'.
Re: File Test -A problem on SunOS 5.9 & perl 5.8.3
by dave_the_m (Monsignor) on May 25, 2004 at 13:41 UTC
    add a system("ls -u /the/file") to your code directly after the -A and see what the OS thinks the last accessed time was.
      This doesn't work. Ideas? Output:
      bash-2.05$ls -u /tmp/file.dat file.dat bash-2.05$ls -u /tmp/somedir bash-2.05$

      Zak - the office
        Sorry, that should be ls -lu

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://356199]
Approved by calin
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2020-07-14 22:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found