in reply to sizeDateValidator.pl is horribly slow
First of all, you should use strict; and use warnings;.
On your first attempt, you do something like this:
$timestamp = POSIX::strftime("%m/%d/%Y %I:%M %p", localtime(( stat $fi +les)[9])); # or change localtime to gmtime $size = (stat $files)[7];
Something like this should do the trick in less time:
# Get both pieces of information we need my ($size, $timestamp) = ((stat $files)[7, 9]); # Convert timestamp $timestamp = POSIX::strftime("%m/%d/%Y %I:%M %p", localtime($timestamp +);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sizeDateValidator.pl is horribly slow
by msensay (Novice) on Nov 07, 2011 at 14:54 UTC |