in reply to Why does stat work sporadically?

Thanks for the help. I've been looking through my books and newsgroup postings for three days and get the answer here in a matter of minutes. I had tried file modification time and it hadn't worked either. The os is unix. japhy's answer of stat "reports/$filename" did the trick.

Replies are listed 'Best First'.
Re: Re: Why does stat work sporadically?
by eg (Friar) on Feb 27, 2001 at 06:20 UTC

    In addition to your books and newsgroups, you might want to add searching through the bundled, online documentation as part of your looking-things-up routine. In particular, perlfunc says, under the entry for readdir:

    If you're planning to filetest the return values out of a readdir(), you'd better prepend the directory in question. Otherwise, because we didn't chdir() there, it would have been testing the wrong file.