Re: Perl equivalent of this script?
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Sun, 16 Jul 2006 15:13:33 -0500
george.varsamopoulos@xxxxxxxxx <george.varsamopoulos@xxxxxxxxx> wrote:
i didn't find
You didn't even look in the Perl FAQ? That's not very nice.
perldoc -q HTML
How do I fetch an HTML file?
<?php
$url = "http://yes.yes.yes/?arg=".$argv[1];
if (($ff = fopen($url, "r"))==NULL) exit();
while (!feof($ff)){
$line = fgets($ff,512);
printf("%s", $line);
}
fclose($ff);
?>
## Is there a short Perl script to replace this PHP script? ##
use LWP::Simple;
my $url = 'http://www.perl.org/';
exit unless my $html = get $url;
print $html;
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.
- Follow-Ups:
- Re: Perl equivalent of this script?
- From: george.varsamopoulos@xxxxxxxxx
- Re: Perl equivalent of this script?
- References:
- Perl equivalent of this script?
- From: george.varsamopoulos@xxxxxxxxx
- Perl equivalent of this script?
- Prev by Date: simulate user activity
- Next by Date: Re: How get UTF-8 from urlencoded web form
- Previous by thread: Re: Perl equivalent of this script?
- Next by thread: Re: Perl equivalent of this script?
- Index(es):
Relevant Pages
|