-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.pl
executable file
·30 lines (22 loc) · 743 Bytes
/
test.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl -w
# Example code from Chapter 1 of /Perl and LWP/ by Sean M. Burke
# http://www.oreilly.com/catalog/perllwp/
# sburke@cpan.org
#require 5;
use strict;
#use warnings;
use Text::CSV;
use LWP::Simple;
use HTML::Tree;
use HTML::TreeBuilder;
use WWW::Mechanize;
use URI::Escape;
my $url = "http://videos.mitrasites.com/william-richmond-(physician).html";
#my $url = "http://videos.mitrasites.com/william-richmond-%28physician%29.html";
my $mech = new WWW::Mechanize;
# Get the first page and its links, then the next page, then pause.
#open(FO, ">" . $filename) or die "Cannot open file $filename $!";
#$content = get($myURI);
$mech->get($url);
#print FO $content;
print $mech->content();