develooper Front page | perl.perl5.porters | Postings from March 2001

Re: flock() on dup'ed filehandle is not enforced

Thread Previous | Thread Next
From:
nick
Date:
March 28, 2001 11:11
Subject:
Re: flock() on dup'ed filehandle is not enforced
Message ID:
E14iLGn-0003hq-00@roam1
Gurusamy Sarathy <gsar@ActiveState.com> writes:
>Anyway, I think you can avoid the extra dup by doing:
>
>    open STDOUT, ">>&=" . fileno(F);

That should work. (The = says not to dup).

In bleadperl that can be written (in theory not tried it):

     open STDOUT, ">>&=", \*F;

-- 
Nick Ing-Simmons


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About