blob: a00ebaa643b2191b54984b7ed912d076148a1a6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/usr/bin/env perl
#-*- perl -*-
#
# Copyright (C) 2004 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $FML: summary.pl,v 1.1 2004/03/28 13:15:07 fukachan Exp $
#
use strict;
use Carp;
use lib qw(../../cpan/lib);
use Mail::Message;
my $test_mode = $ENV{'test_mode'} ? 1 : 0;
my $tmp = "/tmp/buf$$";
for my $f (@ARGV) {
print "// $f\n";
my $fh = new FileHandle $f;
my $wh = new FileHandle "> $tmp";
my $msg = Mail::Message->parse( { fd => $fh } );
print $msg->one_line_summary();
print "\n";
print "\n";
}
unlink $tmp;
exit 0;
|