#!/usr/bin/perl use CGI; use strict; sub read_ml { my ($path) = @_; my @addresses; if(open(ML, $path)) { while() { chop; next if /^#/; push(@addresses, $_); } close ML; } @addresses; } ## MAIN my $cgi = new CGI; my @addrs = &read_ml("/var/spool/ml/testml"); print $cgi->header, $cgi->start_html("Test ML"); print "\n"; print $cgi->end_html;