[EMAIL PROTECTED] wrote: > 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.
What does "no luck" mean? You never tell us what happens when you run your code. > I will basicly trying to open a file, dup > off a few handles and spread them across other processes. Huh? What are you trying to do? > Here is the > code > > #!/usr/bin/perl -w always 'use strict', as others have said. > > $file="./text"; > $|=1; > use Fcntl; > use IO::Handle; > > $D_LOG = $ENV{MHCONTEXTFD}; What is this supposed to be? > > open($LOG, "< logfile"); > open($D_LOG, "<& LOG"); Check for errors! > $LOG->autoflush(1); > $D_LOG->autoflush(1); Why are you autoflushing handles opened for read? Does nothing. > > $line1=<$LOG>; > $line2=<$D_LOG>; > > print "1:$line1 2:$line2"; > I think this approach is doomed to failure, do to the stdio buffers not being shared. Why do you feel you need to dup the input handle? What's the problem are you trying to solve? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]