How do I retrieve content of a website in perl?
That is given an url say, I want a function get so that
$text = get($url);
$text should contain the content of

You could use the wget Unix utility in combination with Perl to do this. Even if you don't have a Windows port of it you could use this: Just call it with system and it will put the content of a web page in a file on your machine. Then you can do what you like with it in Perl. I hope this helps.


Just Use perl WWW::Mechanize module.

google for mwchanize will take you to cpan where u can download WWW::Mechanize module. Unzip it in cgi-bin and use it


hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.