Eric Stephenson wrote:
> $file = "install.log";
> $time = (stat("$file"))[10]; 
> $ltime = localtime($time); 
>  
> print "$ltime\n";

And you get a value in 1969?

Do you also get a message "Use of unitialized value at ... line ..."? You
*are* running with -w and 'use strict', aren't you?

What's probably happening is that the file doesn't exist, so stat returns ()
-- the eleventh element of that list is undef, which is 0 in numeric
context. You pass this undef to localtime and get the weird results you
describe (which, by the way, show you are five hours before GMT, since your
time is 19:00:00 Wednesday -- I have 01:00:00 Thursday since I live in GMT+1
:-)).

Maybe you need to prefix the filename with the correct directory, if you
know that the file exists?

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to