develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [PATCH] [DOCS] Modernize perlopentut.pod

Thread Previous | Thread Next
From:
Ed Avis
Date:
July 21, 2011 05:17
Subject:
Re: [PATCH] [DOCS] Modernize perlopentut.pod
Message ID:
loom.20110721T141142-188@post.gmane.org
Johan Vromans <jvromans <at> squirrel.nl> writes:

>I'm in favour of dropping 2-arg open from the tutorial, or just give it
>a quick mention at the end.

If somebody wants to open a pipe to or from a command, they can use 2-arg open
or they can use IPC::Open2 or IPC::Open3.  I think that if 2-arg open is
mentioned then these modules should be mentioned too.

However, the while (<>) construct does use 2-arg open internally and is still
generally suggested in beginner materials, so the tutorial does need to mention
2-arg open and note that this is the same magic used for <>.

(Whether while (<>) is a safe thing to recommend for beginners is a whole nother
topic which has been discussed on this list before without any general
agreement.)

-- 
Ed Avis <eda@waniasset.com>


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About