develooper Front page | perl.perl5.porters | Postings from February 2013

Re: Don't patch perlopentut: rewrite it completely

Thread Previous | Thread Next
Christian Walde
February 18, 2013 17:59
Re: Don't patch perlopentut: rewrite it completely
Message ID:
On Sun, 17 Feb 2013 02:30:02 +0100, Tom Christiansen <>  

> Nearly every one of those is non-simple. That is not a tutorial, and it  
> is not just about open.  It is more like "FMTEYEWTK About open() and I/O  
> in Perl". If the goal is to create a document that teaches people how to  
> use
> open() for the simple cases, then there is no hope for perlopentut.  It
> cannot be turned into that, because that is not what it is.  You have to
> start over.

When you started talking about Programming Perl (a reference work) in  
to perlopentut (a tutorial) i had the suspicion that the discussion had  
orthogonal. Thank you for realizing that and acting upon it so quickly and  
such a massively productive manner.

Reading through your sketch, i like the tone a lot, as well as the  
contents. I
especially like that it takes care to show how to read code on this  
which is more important than learning how to write.

> I'm still undecided about sysopen: should it stay or should it go?

Anecdotally: I have been reading and writing Perl since early 2005 and  
recall an instance of either reading about or writing sysopen. While i  
not be bothered by seeing it remain, i do not think that removing it would  
any harm.

As for the sketch itself, there are a few things i noticed:

> For _eveyrthing_ else,

>     open($handle, "< $encoding", $filename)

Maybe mention that the space is optional and can be included for  
I normally see it without.

> However, if hitting EOF is an expected and normal event, you
> would not ____ to exit just because you ran out of input.  Instead,

>     use open qw< :encoding(UTF-8) >;

Maybe mention in some way that this is lexically scoped?

I ran out of time at this point, will read the rest and comment as  

With regards,
Christian Walde

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About