NAME
Net::Scan::Extract - This module allows to extract stuff from text.
SYNOPSIS
use Net::Scan::Extract qw( :all );
my $txtfile = $ARGV[0];
die "text file?!\n" if !$textfile;
my @text;
open(TEXT, "<$txtfile") || die "Error: cannot open the text file: $!\n";
chomp (@text = <TEXT>);
close (TEXT);
my @res = Extract_Email(@text);
print "\nEmail Address :\n";
print "$_\n" for @res;
@res = Extract_Html_Links(@text);
print "\nHtml Links :\n";
print "$_\n" for @res;
@res = Extract_Html_Title(@text);
print "\nHtml Title :\n";
print "$_\n" for @res;
@res = Extract_Html_Comment(@text);
print "\nHtml Comment :\n";
print "$_\n" for @res;
@res = Extract_Phone(@text,"x-xxx-xxx-xxxx");
print "\nPhone Address :\n";
print "$_\n" for @res;
@res = Extract_Ipaddress(@text);
print "\nIp Address :\n";
print "$_\n" for @res;
@res = Extract_Script(@text);
print "\nHtml Script :\n";
print "$_\n" for @res;
@res = Extract_Html_Form(@text);
print "\nHtml Form :\n";
print "$_\n" for @res;
@res = Extract_Html_Hidden(@text);
print "\nHtml Hidden Form Field :\n";
print "$_\n" for @res;
exit(0);
DESCRIPTION
Net::Scan::Extract - allows to extract stuff from text.
This module allows to extract email address, html comment, html form, html hidden form field, html links, html title, ip address, phone number and html script from text.
Every function returns an array with data extracted like in the example above. Note: using Extract_Phone function you must specify a phone mask. e.g. x-xxx-xxx-xxxx
SEE ALSO
File::Extract, HTML::Extract, HTML::SimpleLinkExtor, Net::IP::Extract
AUTHOR
Matteo Cantoni, <matteo.cantoni@nothink.org<gt>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Matteo Cantoni
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
cut