my response at the end of this email ----- Original Message ----- From: "Edward G. Orton" <[EMAIL PROTECTED]> To: "Mauricio Lairet P." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, March 24, 2002 1:31 PM Subject: Re: [Perl-unix-users] LWP::Simple returns nothing
> ----- Original Message ----- > From: "Mauricio Lairet P." <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, March 24, 2002 9:51 AM > Subject: [Perl-unix-users] LWP::Simple returns nothing > > > > Hi! > > > > I have a very simple script that gets a URL using LWP::Simple. > > > > For example: > > > > use LWP::Simple; > > > > print get ("http://www.yahoo.com"); > > > > This work great on my Win2K server. But when I transfer this > script to a > > FreeBSD server, the script returns nothing. Why that? > > > > Is there any known trouble with using LWP::Simple on UNIX? If > not, what am I > > doing wrong? > > > Since you didn't describe or include the error message, it's > difficult to tell. > > There are several possibilities: > 1) You transferred the script without changing the line > termination. Unix and Windows have different line terminators. > Open the script in 'vi' and check to see if you have a '^M' at > the end of each line. You'll have to get rid of them. > > 2) How was the script invoked? > "perl scriptname" > Is perl in your path? Is it the right version of perl. Is the > module you require in the right library structure for modules > for the right version of perl? > > "scriptname" > Do you have the "#!/path/perl -w" at the top of your script? Is > the path correct for the version of perl you want to run? > > ego > Edward G. Orton, GWN Consultants Inc. > Phone: 613-764-3186, Fax: 613-764-1721 > email: [EMAIL PROTECTED] > > Hi! I tested the script in another UNIX server and it runs fine so i think everything is fine. In the server I want to run this script the required module is installed "LWP:Simple" and I think this module and the required by this module "Sockets", etc are in the rght library structure. I checked the error log and no error is reported when running the script. This is the whole script: #!/usr/bin/perl -w use LWP::Simple; $url='http://www.yahoo.com'; #for example print "Content-type:text/html\n\n"; print get($url); print "<br>end of output"; The output is: end of output and the page is not returned and no errors This script in other UNIX server returned the yahoo! page and 'end of output' text at the end of the page. I dont understand. Please let me know if you know what could be happening. Thanks in advance, Mauricio _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs