> How can I convert a date that is a string such as "12/12/03" to apoch so > that I can then compare it to time and if its <= time do something. > I can't give code because this is still a concept. > > But the check is that cron will scan a directory hourly or daily. Parse > the filenames which are going to be formatted vendorcode-date.csv > If date <= to current date then call a script that runs an update > against some proprietary accounting software that we have. > > Paul >
I have also had good luck with Date::Manip which includes Date::Parse, and Date::Calc. Alternatively you can parse the date yourself if it is always sane by just splitting on the delimiter, then passing the arguments (in the correct order!) to Time::Local getting the number of seconds... http://danconia.org -- Boycott the Sugar Bowl! You couldn't pay me to watch that game. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>