I really have two questions here: 1) How can I get padded numbers in the single digit range in this script? 2) Hoping tbis isn't some glaring mistake and I'm too blind to see it. Notice how the month is off by 1
cat test.pl #!/usr/local/bin/perl -w $now = time; ## 1 day = 86400 $date_spec = ($now - 86400); # local time adjusted @lta = localtime($date_spec); # 0=second # 1=minute # 2=hour # 3=day of mnth # 5=year # 4=mnth # 6=day of week print " $lta[4]/$lta[3]/" . ($lta[5] += 1900) . " $lta[2]:$lta[1]:$lta[0]\n"; print localtime() . "\n"; OUTPUT: 11/14/2002 20:9:4 Sun Dec 15 20:09:04 2002 Notice how the bare print on `localtime()' gives the desired padding. Notice how the eleventh mnth is reported in the adjusted time. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]