E246 E060 G108 #### #! /usr/bin/perl #open text file and fill array open(MYINPUTFILE, "; # read file into list #remove whitespace @A_list = map { s/^\s+//; s/\s+$//; $_ } @A_in; close(MYINPUTFILE); #fetch each webpage foreach (@A_list) { chomp $A_list; my $url = "http://www.hkjc.com/english/racing/horse.asp?HorseNo=$A_list"; use LWP::Simple; my $content = get $url; die "Couldn't get $url" unless defined $content; #strip away the HTML use HTML::Strip; my $hs = HTML::Strip->new(); my $clean_text = $hs->parse( $content ); $hs->eof; print $clean_text; }