Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl script to check the range of date

Status
Not open for further replies.

zamri72

Technical User
Jun 9, 2009
2
AP
Hi All,

I'm still a newbie in perl programming. I have a data below say in data.txt

Apr 1 2009 3493
Apr 5 2009 3494
Apr 6 2009 3495
Apr 7 2009 3496
Apr 8 2009 3497
Apr 9 2009 3498
Apr 10 2009 3499
Apr 12 2009 3500
Apr 13 2009 3501
Apr 14 2009 3502
Apr 15 2009 3503
Apr 16 2009 3504
Apr 17 2009 3505
Apr 20 2009 3506
Apr 20 2009 3507
Apr 21 2009 3508
Apr 22 2009 3509
Apr 23 2009 3510
Apr 24 2009 3511
Apr 26 2009 3512
Apr 27 2009 3513
Apr 28 2009 3514
Apr 29 2009 3515
Apr 30 2009 3516
May 1 2009 3517
May 4 2009 3518
May 4 2009 3519
May 5 2009 3520
May 6 2009 3521
May 7 2009 3522
May 8 2009 3523
May 10 2009 3524
May 11 2009 3525
May 12 2009 3526
May 13 2009 3527
May 14 2009 3528
May 15 2009 3529
May 17 2009 3530
May 18 2009 3531
May 19 2009 3532
May 20 2009 3533
May 21 2009 3534
May 22 2009 3535
May 24 2009 3536
May 25 2009 3537
May 26 2009 3538
May 27 2009 3539
May 28 2009 3540
May 29 2009 3541
Jun 1 2009 3542
Jun 3 2009 3543
Jun 4 2009 3544
Jun 5 2009 3545
Jun 7 2009 3546
Jun 8 2009 3547
Jun 9 2009 3548
Jun 10 2009 3549

1st, 2nd and 3rd column is a normal date and the 4th colum is the ID.

So, the input for my program will be the range of the From Month and Year to To Month Year. Something will be like this

From Month :
From Year :
To Month :
To Year :

So the script will check on the data to get the ID at the 4th column and pass the ID only into another file for another process checking.

Thanks and BR.
 
and?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Sorry if i missed out my need here :D

Well.. and i really need the expert here to help me out on the perl coding for the date range checking as stated on my first post.

Thanks
 
The idea is that you show us what you've tried so far, and we help you to fix it. It's not a free coding service...

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
zamri72,

students are not allowed to post on this forum. I don't know if you are a student and if that is work associated with your education but if it is please do not post here. If its not, then post what code you have written to try and solve your programming requirments, even if it does not work.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top