#!/usr/local/bin/perl
use URI::URL;
use URI::Escape;
use LWP::UserAgent;
use Date::Format;
use Date::Parse;
use Date::Manip;
require "/techweb/pubs/www/staging/scripts/ad_client.pl";
$symbol_file = "/techweb/pubs/www/production/iw/cgi-bin/iw1001.csv";
read_symbol_file($symbol_file);
$remote_page = "http://fast.quote.com/fq/cmpmedia/group?moe=Groups&group=iw100";
my $table_string = parse_page(read_remote_page($remote_page));
print_results($table_string);
exit;
#######
sub read_remote_page($){
my ($url) = @_;
my $ua = new LWP::UserAgent;
my $request = new HTTP::Request('GET', $url);
my $response = $ua->request($request);
my $server_response = $response->as_string;
my $page = $response->content;
return $page;
}
####
sub parse_page($){
my ($html_string) = @_;
$head_string = "";
($head, $html_remain) = split(/$head_string/, $html_string);
my $html_table = "