I don't see $LOG being set...strict would catch that.

-Tom Kinzer



> 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
> 

Try use strict; and use warnings;(or -w) right off and see what it tells.
What exatcly is happening that you think shouldn't?
I guess I didn't see a question?


> #!/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]

Reply via email to