LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-27-2002, 01:20 PM   #1
linuxRules
Member
 
Registered: May 2002
Distribution: Rehdat 7.3
Posts: 49

Rep: Reputation: 15
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";
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get the LWP pid of linux threads? ninelion Programming 4 08-16-2005 08:32 PM
Linux Software to read .lwp (Lotus Files) rvijay Linux - Software 0 02-09-2005 07:47 AM
lwp::useragent and downloading images joesbox Programming 3 02-17-2004 09:03 AM
lwp libraries for RH Advance server farhan Linux - Software 0 04-23-2003 08:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration