What are some really useful but esoteric language features in Perl that you've actually been able to employ to do useful work?
Guidelines:
(These are all from Corion's answer)
Operators:
++
and unary -
operators work on stringsm//
operatorQuoting constructs:
Syntax and Names:
Modules, Pragmas, and command-line options:
overload::constant
Variables:
Loops and flow control:
Regular expressions:
Other features:
DATA
blockeof
functiondbmopen
functionOther tricks, and meta-answers:
See Also:
The flip-flop operator is useful for skipping the first iteration when looping through the records (usually lines) returned by a file handle, without using a flag variable:
while(<$fh>)
{
next if 1..1; # skip first record
...
}
Run perldoc perlop
and search for "flip-flop" for more information and examples.