#! /usr/bin/perl -wl # mytime2+ script. # Tim Maher, tim@TeachMePerl.com, www.MinimalPerl.com # Improvement to mytime2, from p. 215 of Minimal Perl book. (undef, $minute, $hour)=localtime ; # leave seconds undefined #=====> Convert military time to "civilian" time = 12 and $am_pm='PM'; # hours 12-23 are afternoon $hour > 12 and $hour=$hour-12; # 13-23 ==> 1-11 (PM) $hour == 0 and $hour=12; # convert day's first hour $minute