C
clearguy02
Hi all,
Below is the scenario.
I have a file that has two entrees (a name and a date) seperated by a
tab. I need to get only all those names in the file if the date on the
each line is greater than a certain date, 12-31-2004.
Script
#######################
$current = "31-Dec-04";
foreach (<DATA>) {
($f, $l) = /(\w+)\t+(\w+)/;
print $f if ($l > $current);
}
__DATA__
5.5.25.50 01-Feb-05
TEST1 22-Jul-04
BSTOP 03-Sep-02
DB00004639 21-Jan-05
DB00004693 25-Jan-05
CDM_3.1.0 27-May-03
############################
I think I am failing on comparing stuff. How can I rectify the above
code?
Thanks,
Rider.
Below is the scenario.
I have a file that has two entrees (a name and a date) seperated by a
tab. I need to get only all those names in the file if the date on the
each line is greater than a certain date, 12-31-2004.
Script
#######################
$current = "31-Dec-04";
foreach (<DATA>) {
($f, $l) = /(\w+)\t+(\w+)/;
print $f if ($l > $current);
}
__DATA__
5.5.25.50 01-Feb-05
TEST1 22-Jul-04
BSTOP 03-Sep-02
DB00004639 21-Jan-05
DB00004693 25-Jan-05
CDM_3.1.0 27-May-03
############################
I think I am failing on comparing stuff. How can I rectify the above
code?
Thanks,
Rider.