Tech Support > Computers & Technology > Programming > Perl Scripts
Perl Scripts
Posted by downtoearth on February 16th, 2004


Hi guys,

I write IRC scripts from within mIRC, and I decided to expand the
capabilities of my scripts to accessing the internet by learning Perl.
I am completly setup, but when I started I realized I am doing
something wrong. I can access files that are on my computer rather
easily, but when I start to try the internet it crashes. Here's an
example:

$data_file="http://www.angelfire.com/magic/sheepmagic/Decks/Burn.DEC.txt";
open(DAT, $data_file) || die("Could not open file!");

How can I access files on the internet?

Thanks,
downtoearth

Posted by Jeff Schwab on February 16th, 2004


downtoearth wrote:
http://curl.haxx.se/
http://search.cpan.org/~crisb/WWW-Curl-2.0/easy.pm.in


Posted by MPBroida on February 16th, 2004


downtoearth wrote:
Besides what the other replies give you, you could also
check out the newsgroup:
comp.lang.perl.misc
for perl-specific help.

Mike

Posted by John W. Krahn on February 18th, 2004


downtoearth wrote:

use LWP::Simple;
my $url =
'http://www.angelfire.com/magic/sheepmagic/Decks/Burn.DEC.txt';
my $page = get( $url );


You can read the LWP::Simple documentation by using perldoc on the
command line.

perldoc LWP::Simple

And also the LWP cookbook.

perldoc lwpcook



John
--
use Perl;
program
fulfillment


Similar Posts