How about using LWP?

# Create a new agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("SomeAgentName/0.1 " . $ua->agent);

# Create a request (HTTP,FTP,File)
my $req = new HTTP::Request GET => 'http://www.insiteful.tv';

# Pass request to the user agent and get response
my $res = $ua->request($req);

# Check the outcome of the response
if ($res->is_success) {
 print $res->content;
}
else {
 print "Sorry, no luck. \n";
}


Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-----Original Message-----
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 10:44 AM
To: [EMAIL PROTECTED]
Subject: opening and printing a document?


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.

I've seen that I need the real path if I want to use:

open (FILE, "$path");

while(<FILE>) {
print $_;
}

Do I have another solution?

Thank you.
Teddy,
[EMAIL PROTECTED]



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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


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

Reply via email to