deadlock Message Board
[ January Full List | Reply ]

Re: reading a remote file in perl
From Chip on 12 Jan '00
replying to Re: reading a remote file in perl posted by Jim

Sadly its on an NT box thats run perl!

Thanks for the tip anyway Jim, I'll bear it in mind for if I ever need to do the same thing on a unix box.

I actually tried more or less the same thing as you are suggesting from ASP on the NT box, using the inet object which is basically the equivalent of the Lynx Browser on unix, but sadly although it worked when running on PWS on my machine at home, it would work on my IIS box on the web as the relevant object isn't installed, and my ISP was not prepared to install it.

Anyway thanks again for the advice,

Simon Comins




>There's More Than One Way To Do It... but here's a simple method if
>you're on Unix: use the built-in Lynx browser, like this (note the
>backticks):
>
>@remote_text = `lynx -source http://remote.site.com/page.html`;
>
>... and that's it! You now have the entire text stored neatly in an
>array. If you want to put it in a file, do something like this:
>
>$remote_text = join ('',@remote_text);
>open (FILE,'>/path/to/your/file.txt');
>print FILE "$remote_text";
>close (FILE);
>
>Hope it helps...




Reply to this message

Required Details
Your name:
Subject:

Optional Details
Home page title:
Home page URL:
Email:
(if you'd like to receive automatic replies by email)

Your Message