4.1. Syntactical Sugaring

Perl has an unjustified reputation as a write-only language. We suspect this is because programmers who have never seen it before think they should be able to understand what's going on the first time they lay eyes on a statement the way they could with a BASIC program. But Perl provides many concise idioms and syntactic shortcuts that make programs much shorter than they would have been, and all you need is enough familiarity with the idioms.

4.1.1. The Variable That Wasn't There

A frequent source of bafflement for newcomers is the way that Perl programs seem to be talking to themselves:

while (<STDIN>)
   next unless /\S/;
   # ...

This apparently defies the usual paradigm of functions operating on ...

Get Perl Debugged now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.