Perl flags -pe, -pi, -p, -w, -d, -i, -t?

Yes, Google is notoriously difficult for looking up punctuation and, unfortunately, Perl does seem to be mostly made up of punctuation 🙂 The command line switches are all detailed in perlrun (available from the command line by calling perldoc perlrun). Going into the options briefly, one-by-one: -p: Places a printing loop around your command so … Read more

How can I output UTF-8 from Perl?

use utf8; does not enable Unicode output – it enables you to type Unicode in your program. Add this to the program, before your print() statement: binmode(STDOUT, “:utf8”); See if that helps. That should make STDOUT output in UTF-8 instead of ordinary ASCII.

Hidden features of Perl?

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.