http://qs321.pair.com?node_id=615484

armenica has asked for the wisdom of the Perl Monks concerning the following question:

Hi!

Is there a simple way to open a handle to an URL and read the replied content? I would like to convert the following PHP code to PERL, but can't quite find a function which could do the same:

//Specify your URL $URL = "http://www.exampleurl.com"; //Open a stream in READ mode $handle = fopen ($URL, "r"); //Read the content of the URL and manipulate it. $key = str_replace(' ', '%20',fread($handle, 1000000));

It's the openning of the URL-stream and how to read it I would like to know.

Thanks in advance,

/V

Edit: g0n - code tags and formatting