neutron has asked for the wisdom of the Perl Monks concerning the following question:
Seems simple enough right?? Well, I keep getting the same warning but don't know why:#!perl use warnings; use strict; use 5.010; open FILE, ">hoser.txt"; my @file_info = stat(FILE); close FILE; print join "\n", @file_info; my $timestamp = pop( @file_info ); print my $date = localtime $timestamp;
Everything still works but I don't understand what it's complaining about. By works, I mean the localtime operations works but if I try printing the contents of $timestamp for example, I just get the warning.Argument "" isn't numeric in localtime at examples.pl line 13.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: stat and localtime - take2
by repellent (Priest) on Feb 02, 2009 at 01:35 UTC | |
|
Re: stat and localtime - take2
by linuxer (Curate) on Feb 02, 2009 at 12:20 UTC | |
|
Re: stat and localtime - take2
by viji_india (Initiate) on Feb 02, 2009 at 05:42 UTC | |
|
Re: stat and localtime - take2
by lakshmananindia (Chaplain) on Feb 02, 2009 at 10:15 UTC | |
by repellent (Priest) on Feb 02, 2009 at 16:29 UTC | |
|
Re: stat and localtime - take2
by neutron (Sexton) on Feb 02, 2009 at 01:45 UTC | |
by repellent (Priest) on Feb 02, 2009 at 02:09 UTC | |
|
Re: stat and localtime - take2
by neutron (Sexton) on Feb 02, 2009 at 12:51 UTC |