Re: Perl equivalent of this script?



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
.



Relevant Pages