From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078654410928.tru64-unix-managers.marc@archive.invalid> From: jain () mail ! physics ! smu ! edu (Rakesh Jain) Date: Tue, 20 Jan 1998 18:59:54 +0000 To: tru64-unix-managers Subject: help with perl. X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078654410928 hi there, I am trying to do a date match in perl and it does not seem to work. here is my test program and output. ------------------------------------- #!/usr/local/gnu/bin/perl $month = 0; local ($sec, $min, $hour, $day, $month, $year, $wday, $yday, $isdst) = localtime(); ++$month; if ($month <= 9) { $month = "0$month"; } if ($day <= 9) { $day = "0$day"; } $d_ad_updated = "121297"; $s_ad_updated = "$month$day$year"; print "s_ad_updated = $s_ad_updated\n"; if ($s_ad_updated < $d_ad_updated) { print "$s_ad_updated is less than $d_ad_updated\n"; } system ("date"); exit(0); ------------------------------------------------------------ and output is: s_ad_updated = 012098 012098 is less than 121297 Tue Jan 20 12:56:42 CST 1998 Here we can see the comparison does not work. Any pointers to solve this problem will be greatly appreciated. Thanks Rakesh