--- Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I know how to open and print an html or text
> document on the screen if the
> file is on my site and I know the real path to the
> file.
> I want to open and print a document on the screen
> but it is not on my site
> and of course, I don't know the real path to that
> file.

If this is in the context of presenting information
back to a browser, is it sufficient to just do a
redirect to the URL (see perldoc CGI)? A redirect does
basically what you are asking, gets a file at a URL
and prints it to the screen. I'm assuming that there
is a reason you can't just use a plain link from a
page, such as you need a script to construct the URL
at "run-time"?

If your situation is a little more complicated than
that, what you may want is the LWP::UserAgent module
(see perldoc LWP::UserAgent). This will also require
HTTP::Request and HTTP::Headers. This allows your
script to request a document at a URL and get back the
response in an object variable, which you can then do
whatever you want with, such as print it or parse it.

- John


=====
"When you're following an angel, does it mean you have to throw your body off a 
building?" - They Might Be Giants, http://www.tmbg.com
----
Word of the week: Serendipity, see http://www.bartleby.com/61/93/S0279300.html

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to