develooper Front page | perl.perl5.porters | Postings from August 2008

Re: [PATCH] Add open "|-" and open "-|" to perlopentut

Shlomi Fish
August 24, 2008 20:32
Re: [PATCH] Add open "|-" and open "-|" to perlopentut
Message ID:
On Monday 25 August 2008, Eric Wilhelm wrote:
> # from Shlomi Fish
> # on Sunday 24 August 2008 13:28:
> >This patch documents open "|-" and open "-|" in perlopentut.
> Perhaps it should follow the practice of single quoting non-interpolated
> strings like '|-' and 'fortune'?  

Fixed in my copy.

> Also, the filehandle in a simple 
> scalar $pipe does not need to be wrapped in a block when used as an
> argument to print.  


print $pipe "Hi there!\n"

is not recommended by PBP and I agree that the $pipe does not really stand out 

> The error message could probably stand to contain 
> $! as well.

Fixed in my copy.

> I find the md5sum example not very illustrative (because md5sum will
> just print the result to stdout.)  What about simply restating the
> aforementioned lpr and netstat examples?

I converted the '|-' example to "lpr".

> Finally, should these examples be included *before* the references to
> IPC::Open2 and perlipc?

Don't know.

> --Eric

New patch attached.


	Shlomi Fish

Shlomi Fish
"The Human Hacking Field Guide" -

Shlomi, so what are you working on? Working on a new wiki about unit testing 
fortunes in freecell? -- Ran Eilam Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About