in reply to d-mmm-yyyy to DOY (day of year)

Try the Date::Manip module.

use Date::Manip; $day_of_year = 0 + UnixDate("3-Apr-2012", "%j");