On Mon, Apr 01, 2013 at 07:29:53PM +0100, Dominic Hargreaves wrote: > On Wed, Oct 05, 2005 at 06:12:10PM +0200, Vincent Lefevre wrote: > > The perlfunc(1) man page contains: > > > > In the 2-arguments (and 1-argument) form opening '-' opens > > STDIN and opening '>-' opens STDOUT. > > > > I don't think this means anything, and there are no examples for > > this form. Perhaps the correct word is "dup" instead of "open"? > > And what is dupped? STDIN (resp. STDOUT) or fd 0 (resp. fd 1)? > > Good questions, and I don't know the answer. That paragraph persists, > although (noting for searchability) it's now > > In the two-argument (and one-argument) form, opening "<-" or "-" > opens STDIN and opening ">-" opens STDOUT. > > If anyone else knows what this syntax means, do tell!
It seems to associate another file handle with STDIN/STDOUT. % echo test | perl -e 'open(IN, "<-") and open(OUT, ">-") or die; print OUT while <IN>' test Not sure how to word the docs better though. -- Niko Tyni nt...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org