current date - 8 months in perl script

view story

http://www.unix.com – I have a requirement as follows. when i pass a date to the perl script, it has to calculate the current date - 8 months and output the date back to the shell script in date format (YYYY-MM-DD). Current date - 8 months is not constant.. because leap year, and the months jan, mar, may,.... has 31 days and april, june,.... has 30 days. The output should be accurate. Can anyone provide a solution for this issue. Thanks Krishnakanth (HowTos)