Gregory S Hayes wrote: > > but it would look much nicer in the framework of this version of open(), > perhaps something like ... > > ($readme, $writeme) = open doublehandle "/path/program -args"; > print $writeme "here's your input\n"; > $output = $readme; > $writeme->close; > $readme->close; > > Thoughts? Believe it or not, I have been tooling around with this very idea. Great minds think alike. ;-) The exact syntax I've been toying with involves a "dual" pseudoclass, much like the "dir" pseudoclass: ($readme, $writeme) = open dual "/path/program -args"; print $writeme "here's your input\n"; $output = <$readme>; # readline, not assignment close $writeme; # indirect object syntax close $readme; # ditto There are some subtle differences between this and your syntax to make this comply with existing Perl, but the idea remains the same. You can call "close $handle" or "$handle->close" by virtue of the indirect object syntax. -Nate
- Re: RFC 33 (v2) Eliminate bareword fi... Buddha Buck
- Re: RFC 33 (v2) Eliminate barewo... David L. Nicol
- Re: RFC 33 (v2) Eliminate barewo... Nathan Wiger
- Re: RFC 33 (v2) Eliminate barewo... Tom Christiansen
- Re: RFC 33 (v2) Eliminate barewo... Casey R. Tweten
- Re: RFC 33 (v2) Eliminate barewo... Peter Scott
- Re: RFC 33 (v2) Eliminate barewo... Gregory S Hayes
- Re: RFC 33 (v2) Eliminate barewo... Tom Christiansen
- Re: RFC 33 (v2) Eliminate barewo... Nathan Wiger
- Re: RFC 33 (v2) Eliminate barewo... Tom Christiansen
- Re: RFC 33 (v2) Eliminate barewo... Nathan Wiger
- Re: RFC 33 (v2) Eliminate bareword filehandles. Peter Scott
- ARGV vs $ARGV (was Re: RFC 33 (v2) Eliminate bare... Nathan Wiger
- Re: RFC 33 (v2) Eliminate bareword filehandles. Bart Lateur
- Re: RFC 33 (v2) Eliminate bareword filehandles. Tom Christiansen
- Re: RFC 33 (v2) Eliminate bareword filehandle... Bart Lateur
- Re: RFC 33 (v2) Eliminate bareword filehandles. Jonathan Scott Duff
- Re: RFC 33 (v2) Eliminate bareword filehandles. Piers Cawley