I'm still a newbie in perl programming. I have a data below say in test.tmp
The output in test.tmp will be the same data as above sample in test.tmp . So after i get all the 4th column data within the range of month and year i need, then i will use the foreach () code to execute another command to get the job done
while (my $line = <FH>){
chomp $line;
my @cols = split (' ',$line); #mon date year id
if ($cols[2] >= $from_year && $cols[2] <= $to_year && $month_hash{lc($cols[0])} >= $month_hash{lc($from_month)} && $month_hash{lc($cols[0])} <= $month_hash{lc($to_month)} ) {
print "$cols[3]\n";
}
}
Note: There are many scripting lang which produces the desired result . the key is what you want to use and the ability to try and use it. if you give up you will end up being a newbie.