C
Chris
Hi,
I'm trying to import a htm file (from an external site) into an array
and then parse each line to check for a certain line. I have tried
the following:
#!/usr/local/bin/perl -w
use warnings;
use strict;
use LWP::Simple;
my @site = ("http://www.webbuyeruk.co.uk/links.htm");
foreach my $site (@site){
my @content = get ($site);
print "Array entries: $#content\n";
}
the above puts all of the lines into the first array entry [0], how
can I change this??
Also the following:
open(MYFILE, "<($site[0])") || die "Can't open $site[0] : $!\n";;
my @filedata = <MYFILE>;
close(MYFILE);
gives me the following result:
Can't open http://www.webbuyeruk.co.uk/links.htm : Invalid argument
Is this because it is trying to change the file instead of reading it?
How can I get around this?
Chris.
I'm trying to import a htm file (from an external site) into an array
and then parse each line to check for a certain line. I have tried
the following:
#!/usr/local/bin/perl -w
use warnings;
use strict;
use LWP::Simple;
my @site = ("http://www.webbuyeruk.co.uk/links.htm");
foreach my $site (@site){
my @content = get ($site);
print "Array entries: $#content\n";
}
the above puts all of the lines into the first array entry [0], how
can I change this??
Also the following:
open(MYFILE, "<($site[0])") || die "Can't open $site[0] : $!\n";;
my @filedata = <MYFILE>;
close(MYFILE);
gives me the following result:
Can't open http://www.webbuyeruk.co.uk/links.htm : Invalid argument
Is this because it is trying to change the file instead of reading it?
How can I get around this?
Chris.