head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 97.11.26.14.43.49; author alexis; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @#!/usr/bin/perl while (<>) { # From alexis@@nevsky Tue, 25 Feb 1992 21:34:11 GMT remote from spuddy if (! $baddateinfrom && /^From\s+([\w@@]+)\s+(\w\w\w),?\s+([0-9][1-9]?)\s+(\w\w\w)\s+(19[789][0-9])\s+([0-9][0-9]?:[0-9][0-9]?:[0-9][0-9]?)\s+(GMT)\s+(.*)\n$/) { $baddateinfrom = 1; # print "Addr $1\n"; # print "Day $2\n"; # print "Date $3\n"; # print "Month $4\n"; # print "Year $5\n"; # print "Time $6\n"; # print "Zone $7\n"; # print "Rem $8\n"; print "From $1 $2 $4 $3 $6 $7 $5 $8\n"; } elsif (!$missingfrom && ! /^From\s+/) { $missingfrom = 1; print "From unknown Mon, Jan 1 00:00:00 GMT 1970\n"; } else { print; } } @