Hello Terry, I think you could use the sprintf function. The pattern %2d ensures that each element from the array is two digits using 0 as the pad.
With the following I ended up with 120307 which shows me that it is padding each array element with 2digits. I think this may get you off into a good direction. my $filetime = sprintf("%02d%02d%02d",$queuetime[2],$queuetime[1],$queuetime[0]); Hope it helps. Scott -----Original Message----- From: Terry Vaughn [mailto:tvaughn@;dakotagrowers.com] Sent: Friday, November 01, 2002 9:37 AM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] Join Question Hello all. Can someone tell me how to maintain the "0" in the below join statement. For times < 1200 noon I need to maintain the '0'. example: 8:30am should join as 0830 ....preferrably not 830 which is the string generated. Thanks. Terry $queuetime = (stat("$PREIMPORTDIR/$PREIMPORTFILE"))[9]; @queuetime = localtime $queuetime; $filetime = join("",$queuetime[2],$queuetime[1],$queuetime[0]); _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs