OK, but how about:

1)where is $LOG being set?
2)does it get past the dies shown below?
3)got strict?  it's 'fer your own good, you know! ;)

-Tom Kinzer



#!/usr/bin/perl -w

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

$D_LOG = $ENV{MHCONTEXTFD};

open($LOG, "< logfile") or die "Unable to open 1st handle, stopped";
open($D_LOG, "<& LOG")  or die "Unable to open 2nd handle, stopped";
$LOG->autoflush(1);
$D_LOG->autoflush(1);

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

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

-----Original Message-----
From: Mark Goland [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 7:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Reading files


Sorry for not being more clear. The problem is that it doesnt seem to be
able to read of the duped handle { $line2 is empty on }.

----- Original Message ----- 
From: "Tom Kinzer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 4:15 PM
Subject: RE: Reading files


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



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