I pitched a book called Perl for Python Programmers[0] and it included an
entire chapter about how important context is when understanding Perl.
So there's the *number* contexts: void, scalar, list
And there's the *type* contexts: number, string, references
Perl does its best to "Do What You Mean" but sometimes it gets confused and
usually contexts don't matter... except when they do.
Would people really like a presentation about contexts in Perl?
[0] - The target audience was programmers who mostly worked in Python but had
infrastructure components written in Perl they wanted to understand (and
replace.) The company passed on publishing the book.
On Wednesday, February 19, 2014 11:00 AM, Robert Stone <[email protected]>
wrote:
Greetings,
I came across this posting that goes into a lot of detail regarding context:
http://perlhacks.com/2013/12/misunderstanding-context/
Linked in that article is also another interesting posting on the differences
between Arrays and Lists.
http://friedo.com/blog/2013/07/arrays-vs-lists-in-perl
Personally I find context one of the most fascinating aspects of Perl (Maybe
someone should do a presentation!) and I must admit I've been guilty of
referring to things as being in "Array Context". Does anyone disagree with
these postings or have any additional knowledge to share?
Happy Reading!
Best Regards,
Robert Stone
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/