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

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

Eric Wilhelm
August 24, 2008 18:03
Re: [PATCH] Add open "|-" and open "-|" to perlopentut
Message ID:
# 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'?  Also, the filehandle in a simple 
scalar $pipe does not need to be wrapped in a block when used as an 
argument to print.  The error message could probably stand to contain 
$! as well.

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?

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

"Beware of bugs in the above code; I have only proved it correct, not
tried it."
--Donald Knuth
--------------------------------------------------- Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About