in reply to stat and localtime

Use time(), which returns the number of seconds since the epoch (Jan 1, 1970, 0:00 GMT)
Hope it helps.

P.S. You don't need all those parens:
$days1 = $file1[10] / 60 / 60 / 60 / 24 / 7;
Hmm. I know there are 60 seconds in a minute, and 60 minutes in an hour, 24 hours in a day and seven days per week. What's the third 60 for?

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Replies are listed 'Best First'.
Re: Re: stat and localtime
by Beatnik (Parson) on Dec 20, 2001 at 18:39 UTC
    Epoch's not always January 1st, 1980. On Macintosh it's January 1st, 1904...
    No, I don't care to explain why :)

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.