Hi I have a problem with the "while" loop it keeps printing the same line but when i go to the page source code there are a cople of line with the same syntax pls someone tell my what is the prob here thz
Here is the code
Here is the code
Code:
use strict;
use warnings;
use HTTP::Cookies;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use HTTP::Request::Common qw(GET);
my $ua = new LWP::UserAgent;
my $cookie_jar = HTTP::Cookies->new(file => 'pansatdirectcookies.txt', autosave => 1, ignore_discard => 1);
$ua->cookie_jar($cookie_jar);
my $url = '[URL unfurl="true"]http://www.pansatdirect.net/beta2/catalog/index.php?cPath=26';[/URL]
my $req = GET $url;
my $res = $ua->request($req);
if ($res->is_error()) {
printf " %s\n", $res->status_line;
} else {
my $content = $res->as_string;
#My prob. is here
while ($content =~ /<td align="center" class="productListing-data">(.+)<a href="(.+)"><img src="(.+)" border="0" alt="(.+)- <font color=(.+)>(.+)<(.+)title="(.+)- <font color=(.+)>(.+)<(.+)" width="160" height="128"><\/a>(.+)<\/td>/m) {
print "$2\n";
print "$4\n";
print "$6\n";
}
}
}