On Dec 3, 2003, at 7:44 AM, [EMAIL PROTECTED] wrote:


how can I dup file handles

do you mean:


           open(LOG, ">>/tmp/logfile");
           open(STDERR, ">&LOG");

hence you code is One $ over the line?

        #!/usr/bin/perl -w
        use strict; # this would help you with finding those
                                # nasty bits where you have variables not set...

        $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";

HTH.

ciao
drieux

---


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



Reply via email to