1 # This is a little perl script for test 581. It reads the first failed time
2 # from test-stdout, turns it back into an integer, and forces the received
3 # time in the -H file of the current message.
7 opendir(DIR, "spool/input");
8 while (($_ = readdir(DIR)))
18 @months = ("Jan", "Feb", "Mar", "Apr", "May", "Jun",
19 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
21 open(IN, "test-stdout") || die "can't open test-stdout\n";
29 ($mday,$mon,$year,$hour,$min,$sec) =
30 /(\d\d)-(\w\w\w)-(\d\d\d\d) (\d\d):(\d\d):(\d\d)/;
32 for ($i = 0; $i < 12; $i++)
34 if ($mon eq $months[$i])
41 $t = timelocal($sec,$min,$hour,$mday,$mon,$year);
43 open(IN, "spool/input/$hfile") || die "can't open spool/input/$hfile";
52 print OUT while (<IN>);
57 rename("test-H", "spool/input/$hfile") || die "rename failed\n";