here is some sample code that I have thus far:
Expand|Select|Wrap|Line Numbers
- use HTTP::Request::Common;
- use LWP::UserAgent;
- use LWP::Simple;
- $ua = LWP::UserAgent->new;
- $request = HTTP::Request->new(GET => 'http://www.cnn.com');
- $response = $ua->request($request);
- $content = $response->content();
- my $result2 = substr $content, index($content, 'Headlines');
I have tried other methods including simpler code:
Expand|Select|Wrap|Line Numbers
- my $content = get('http://securities.stanford.edu//1014/TCHC00');
I have even tried putting the contents into a text file, but I am not able to extract a string from a text file either?
any help is appreciated!!!