<html>
<body>
I see your use of perldoc entries - nice.<br>
Is there a simple way to force perldoc to launch if the user enters
./myscriptwithdoc --help?<br><br>
something like:<br><br>
if ($ARGV[0] =~ /help/i)<br>
{<br>
system("perldoc $0");<br>
}<br><br>
<br><br>
<br><br>
<blockquote type=cite class=cite cite>=head1 NAME<br><br>
get_email.pl - quick script to extract email addresses from SMS
log<br><br>
=head1 SYNOPSIS<br><br>
get_email.pl [smslog ...]<br><br>
=head1 DESCRIPTION<br><br>
Parses SMS log files to extract a list of user email addresses, and<br>
prints them to STDOUT one per line.<br><br>
=cut<br><br>
# A regular expression to match a reasonable looking email address<br>
my $email = qr#[\w\-\.]+\@[\w\-\.]+#;<br><br>
while(<>) {<br>
chomp;<br><br>
unless ( /^\[([\w\s:]+)\] SMS\s+(.+?)\s+sent \d+
characters to \d+\s*$/ ) {<br>
warn "Can't parse log
line [$_]\n";<br>
next;<br>
}<br>
my ($date, $addr) = ($1, $2);<br><br>
# We're only interested in May<br>
next unless $date =~ / May /;<br><br>
if ( $addr =~ /<($email)>$/ or $addr =~
/^($email)$/ ) {<br>
print "$1\n";<br>
}<br>
else {<br>
warn "Can't parse address
[$addr] at log line [$_]\n";<br>
}<br>
}<br><br>
</snip><br><br>
--<br>
Nick<br>
_______________________________________________<br>
Za-pm mailing list<br>
Za-pm@mail.pm.org<br>
<a href="http://mail.pm.org/mailman/listinfo/za-pm" eudora="autourl">http://mail.pm.org/mailman/listinfo/za-pm</a>
</blockquote>
<x-sigsep><p></x-sigsep>
<tt><br>
<font face="Courier New, Courier" size=2>Spike Hodge<br><br>
UNIX Programmer<br>
</font></tt><font face="Courier New, Courier" size=2>M-Web Technology<br>
</font><tt>021 596 8496<br>
082 901 5265<br><br>
</tt>Click here and make M-Web your homepage<br>
<a href="http://homepage.mweb.co.za/" eudora="autourl">http://homepage.mweb.co.za</a></body>
</html>