#get seconds-since-1970 $current_time = time(); #load the Date portion of the LWP library use HTTP::Date; #make a nicely-formatted time $stringGMT = time2str($current_time); print <<"EOI"; Expires: $stringGMT Content-type: text/html [put your HTML stuff here!] EOIThe
HTTP:Date library also includes the function
str2time which converts the other way (i.e., from an
ascii string (in most reasonable formats) into seconds-since-1970.)
Last modified: Wed May 15 16:11:10 DST 1996