Code previously displayed "Time::tm=ARRAY(0xe1e4f8)" instead of a time
string.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
use Getopt::Long;
use Time::localtime;
-use POSIX qw/:sys_wait_h/;
+use POSIX qw/:sys_wait_h strftime/;
$SIG{CHLD} = \&sig_handler;
} elsif ($pid) {
$running++;
$now_time = localtime;
- print "$count of $goal processed at " . $now_time . "\n" if ($verbose && $count);
- print($now_time . ": dispatched: $command\n") if ($verbose);
+ my $now_string = strftime("%a %b %e %H:%M:%S %Y", CORE::localtime);
+ print "$count of $goal processed at $now_string\n" if ($verbose && $count);
+ print($now_string . ": dispatched: $command\n") if ($verbose);
print $running . " processes running\n" if ($verbose);
} elsif ($pid == 0) {
exec($command);