Please help, need to create script to remove lines by date in file

Please Help (novice to PERL and SHELL scripting)�. Need to create a script which removes all lines in $filename = "cycle_calendar_ftp_out" older than current date � a variable which will be a number of days passed to script. For Ex it will look at the end date which is the last field (4) and compare it to current date (so for today it will take 08APR2014 � For Ex: 3 days) and remove all record which have a enddate less than 05APR2014) So I believe that the date will need to be converted to a number prior to comparing to current date. What I have thus far is a group of statements �
NOTE:
The file doesn�t have a header with column headings. This script will be scheduled to executed daily and will need to open file and remove lines and write to same file.

File layout: (end date is the last field)

GAHS*CGL-*01JAN2013000000*04JAN2013000000
GAHS*CGL-*13JAN2013000000*23JAN2013000000
GAHS*CGL-*31JAN2013000000*01FEB2013000000
GAHS*CGL-*01FEB2013000000*10FEB2013000000
GAHS*CGL-*21FEB2013000000*25FEB2013000000
GAHS*CGL-*26FEB2013000000*01MAR2013000000
GAHS*CGL-*01MAR2013000000*06MAR2013000000
GAHS*CGL-*14MAR2013000000*24MAR2013000000
GAHS*CGL-*24MAR2013000000*26MAR2013000000
GAHS*CGL-*02APR2013000000*03APR2013000000
GAHS*CGL-*03APR2013000000*05APR2013000000
GAHS*CGL-*05APR2013000000*14APR2013000000
GAHS*CGL-*14APR2013000000*16APR2013000000
GAHS*CGL-*25APR2013000000*26APR2013000000
GAHS*CGL-*26APR2013000000*01MAY2013000000

-----some of what I have thus far-------

use Time::Local;
open (SRC, "$model_dir/$filename") || die;
BEGIN {
FS = "*"
month["JAN"] = "01";month["FEB"] = "02";month["MAR"] = "03";
month["APR"] = "04";month["MAY"] = "05";month["JUN"] = "06";
month["JUL"] = "07";month["AUG"] = "08";month["SEP"] = "09";
month["OCT"] = "10";month["NOV"] = "11";month["DEC"] = "12";
}
 
{
day = substr($4,1,2) ;
mm = month[substr($4,3,3)];
year = substr($4,6,4) ;
 
printf "%s : %s / %s / %s\n", $4, mm, day, year ;
}

---------------------------------------------
Again any help is appreciated, Thank You for helping

Is this a homework assignment?

No this is something I need to manage a file for my personal venture..

---------- Post updated 04-09-14 at 07:38 AM ---------- Previous update was 04-08-14 at 10:56 PM ----------

Does anyone have any suggestions?