File: sample.pl

package info (click to toggle)
libmail-listdetector-perl 1.04%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 974; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w

use strict;
use Mail::Internet;
use Mail::ListDetector;

my $message = Mail::Internet->new(\*STDIN);

my $list = Mail::ListDetector->new($message);

if (defined($list)) {
  print "List software: ", $list->listsoftware, "\n";
  print "List posting address: ", $list->posting_address, "\n";
  print "list name: ", $list->listname, "\n";
} else {
  print "No object returned\n";
}

exit 0;