sub makeDate{ @days = ("Sun","Mon","Tues","Wed","Thurs","Fri","Sat"); @mons = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept", "Oct","Nov","Dec­­"); (undef,undef,undef,$mday,$mon,$year,$wday,undef,undef) = localtime(time); $year = 2000 + ($year - 100); $date = "$days[$wday] $mons[$mon] $mday $year"; return $date; } $date = makeDate(); # ... do a lot of other things ... print "

Hello, currently it's $date!

\n";