Re: 3-argument open on STDIN

2011-08-23 Thread Bryan R Harris
"Bryan" == Bryan R Harris writes: >>> >>> Bryan> How can I use the "safe" 3-argument open and still be able to read >>> off >>> a >>> Bryan> pipe? >>> >>> You don't. 2-arg open has to be good for something. >>> >>> And 2-arg open is perfectly safe if the second arg is a literal: >

Re: 3-argument open on STDIN

2011-08-23 Thread Rob Dixon
On 23/08/2011 04:17, Bryan R Harris wrote: "Bryan" == Bryan R Harris writes: Bryan> How can I use the "safe" 3-argument open and still be able to read off a Bryan> pipe? You don't. 2-arg open has to be good for something. And 2-arg open is perfectly safe if the second arg is a literal:

Re: 3-argument open on STDIN

2011-08-22 Thread Bryan R Harris
>> "Bryan" == Bryan R Harris writes: > > Bryan> How can I use the "safe" 3-argument open and still be able to read off > a > Bryan> pipe? > > You don't. 2-arg open has to be good for something. > > And 2-arg open is perfectly safe if the second arg is a literal: > > open OTHER, "<-" o

Re: 3-argument open on STDIN

2011-08-22 Thread Randal L. Schwartz
> "Bryan" == Bryan R Harris writes: Bryan> How can I use the "safe" 3-argument open and still be able to read off a Bryan> pipe? You don't. 2-arg open has to be good for something. And 2-arg open is perfectly safe if the second arg is a literal: open OTHER, "<-" or die; open my $handl

3-argument open on STDIN

2011-08-22 Thread Bryan R Harris
How can I do a 3-argument open on STDIN? This doesn't work because the 3-argument open won't open STDIN when you tell it to open "-". ** @files = ("-"); for (@files) { print reverse readfile($_); } sub readfile {

Re: 3-argument open on STDIN

2011-08-17 Thread Shawn H Corey
On 11-08-17 06:53 PM, Bryan R Harris wrote: How can I do a 3-argument open on STDIN? This doesn't work because the 3-argument open won't open STDIN when you tell it to open "-". ** @files = ("-"); for (@files) { prin

Re: 3-argument open on STDIN

2011-08-17 Thread Rob Dixon
On 18/08/2011 01:35, John Delacour wrote: At 17:53 -0500 17/08/2011, Bryan R Harris wrote: How can I do a 3-argument open on STDIN? This doesn't work because the 3-argument open won't open STDIN when you tell it to open "-". ** @files =

Re: 3-argument open on STDIN

2011-08-17 Thread John Delacour
At 17:53 -0500 17/08/2011, Bryan R Harris wrote: How can I do a 3-argument open on STDIN? This doesn't work because the 3-argument open won't open STDIN when you tell it to open "-". ** @files = ("-"); for (@files

Re: 3-argument open on STDIN

2011-08-17 Thread Brandon McCaig
On Wed, Aug 17, 2011 at 6:53 PM, Bryan R Harris wrote: > How can I use the "safe" 3-argument open and still be able to read off a > pipe? What I have done in the past is manually compare the filename to '-' and skip the opening and just assign STDIN to my file handle. use strict; use warnings;

3-argument open on STDIN

2011-08-17 Thread Bryan R Harris
How can I do a 3-argument open on STDIN? This doesn't work because the 3-argument open won't open STDIN when you tell it to open "-". ** @files = ("-"); for (@files) { print reverse readfile($_); } sub readfile {