my $wday = (localtime $now)[6]; .... my($mday, $mon, $year) = (localtime($now-$then))[3..5];