start off by putting some "or die"s on those file opens.

where are you breaking or what is the error message?

not sure what the problem is exactly.

-Tom Kinzer


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:53 AM
To: [EMAIL PROTECTED]
Subject: Reading files


Hello All,
I am trying to open a file once , and then duplicate it's File Handle. I am
trying to workout example straight from FAQ5, with no luck. I will basicly
trying to open a file, dup off a few handles and spread them across other
processes. Here is the code

#!/usr/bin/perl -w

$file="./text";
$|=1;
use Fcntl;
use IO::Handle;

$D_LOG = $ENV{MHCONTEXTFD};

open($LOG, "< logfile");
open($D_LOG, "<& LOG");
$LOG->autoflush(1);
$D_LOG->autoflush(1);

$line1=<$LOG>;
$line2=<$D_LOG>;

print "1:$line1 2:$line2";

Thanks in Advance,
Mark G.


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


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

Reply via email to