Thread: perl question
View Single Post
Old 05-26-2011, 05:35 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,519
perl question

is their something like mechanize for a local file?


Code:
#!/usr/local/bin/perl

use WWW::Mechanize;

binmode(STDOUT, ":utf8");

my $url  = "http://domain.com/bookmarks.html";
my $mech  = WWW::Mechanize->new();
$mech->get( $url );
my @links = $mech->links();

foreach my $link (@links) {
   print $link->url() . "|" . $link->text() . "\n";
}
like this but for a local file?
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote