Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-06-2006, 04:07 PM   #1
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Rep: Reputation: 30
PERL: Can you open an HTML file from a web address?

I am brand new to PERL and I'm trying to figure out if I can open an HTML file for parsing from a web address. It seems to me that I have heard the file argument in open(HANDLE, $FilePath) called a URL. But, I can't seem to put a URL in there, as in "open(FH,'HTTP://')" Maybe I am adding it wrong or something. If it is possible, documentation does not seem to reflect it.

Any ideas, anyone?
Old 02-06-2006, 04:20 PM   #2
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
My Perl is a bit rusty, but if I was doing this, my first approach would be to look up the CURL library. I've been using it recently in other languages for exactly the same purpose, and I know it's available for Perl, so I'd say it's exactly what you're looking for.

Google gave me these results:

Sorry I can't help you with more precise code examples, but I hope I've been of some help
Old 02-06-2006, 05:57 PM   #3
Registered: Mar 2005
Distribution: Debian stable, OpenBSD, FreeBSD
Posts: 30

Rep: Reputation: 15
Probably not what you're looking for, but you could always use wget:


Then read it in and do what you like.

Not sure how complicated you need it, but that may suffice for the time being.

Good luck.
Old 02-07-2006, 11:06 AM   #4
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
cURL looks like my best bet and even better, a complete script is available that looks like it does what I want to do: Leech. And cURL is required to be installed to make this thing work.

I did want something to work on my XP-Pro. Oh well.

Thanks, all who replied.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open HTML file in default browser through C++ Last Attacker Linux - General 10 10-20-2005 12:32 PM
Apache-HTML can't open dir on web site comprookie2000 Linux - Networking 4 03-07-2005 02:40 PM
cgi perl : I cant get perl to append my html file... the_y_man Programming 3 03-22-2004 05:07 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
Perl Script Reading a txt file and generate html to be published! kofi Linux - Software 1 09-22-2003 05:12 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration