> > I am trying to set up a script that will do the do a current time -1 > routine. > > Examples: > > Current Time: > mmddyy:hhss > 052804:1030 > > Output: > 052804:0930 > > > Current Time: > 052704:0015 > > Output: > 052604:23:15 > > > I think the add_delta module is where I need to go, but I have never used > modules before. >
add_delta is probably a method/function in Date::Calc or Date::Manip modules. But in this case is probably overkill. You can use the built-in functions 'time' and 'localtime' to get the desired effect. perldoc -f time perldoc -f localtime 'time' will return the current time, from which you can subtract 60*60 (60 seconds in each of 60 minutes), which gives 1 hour ago. You can then use localtime to retrieve the values for the specific fields you need at the calculated time. Alternatively you could use POSIX::strftime for the formatting. perldoc POSIX HTH, http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>