in reply to stat and localtime

You seem to be passing a filename to localtime which probably isn't what you wanted to do.

Perhaps you could try:

my ($seconds, $minutes, $hours, $day_of_month, $month, $year, $wday, $yday, $isdst) = localtime($file1[10]);

or even

my ($day_of_month, $month, $year) = (localtime($file1[10]))[3..5];
--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg