LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   using LWP (https://www.linuxquestions.org/questions/programming-9/using-lwp-24455/)

linuxRules 06-27-2002 01:20 PM

using LWP
 
Could someone help me with this code ?
It doesn't fail yet it doesn't print the lines out.
Thanks !!!


#!/usr/bin/perl
use CGI qw (:standard);
use CGI::Carp qw(fatalsToBrowser);
use LWP::Simple;

$q = new CGI;
print $q->header;

$URL="http:www.yahoo.com";


if (defined ($page = get($URL))) {
die " Could not connect to $url";
}


@page = split(/\n/,$page);

print "@page";

foreach $line (@page){
print "$line\n";
}


All times are GMT -5. The time now is 06:53 PM.