#!/usr/bin/perl -w # remove top two lines if you're on Mac OS 9, including this one #Perl -Sx "{0}" {"Parameters"}; Exit {Status} #!//boot/home/config/bin/perl @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); @months = ('January','February','March','April','May','June','July','August','September','October','November','December'); ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6]; $year += 1900; if ($mon < 10) { $mon = "0$mon"; } $mday =~ s/1\b/1st/; $mday =~ s/2\b/2nd/; $mday =~ s/3\b/3rd/; $mday =~ s/11\b/11th/; $mday =~ s/12nd\b/12th/; $mday =~ s/13rd\b/13th/; $mday =~ s/(4\b|5\b|6\b|7\b|8\b|9\b|0\b)/$1th/; $date = "$months[$mon] $mday"; # only use html if we are inserting the date in an html file if ($ENV{"PEPPER_CURRENT_FILE"} =~ /.asp$|.shtml$|.html$|.htm$|.php$/) { print "\($date\)"; } else { print "$date $year"; }