or, Perl nuggets I absolutely, positively
can no longer live without:
9 ... A new acronym: STFW
to complement an old favorite: RTFM
8 ... use diagnostics;
when use warnings; just isn't verbose enough
7 ... __DATA__ (see perldata)
You mean I don't need to create all those extra temporary input files after all?
6 ... Data::Dumper
I'm really gonna miss adding all those print statements to debug my code. NOT!
5 ... Obfuscated camel code
When I showed the output of the script to a co-worker, he said, "Wow! That's cool!", and when I told him to look at the contents of the script, he said, "It's a little hard to read though". I can't make this stuff up.
4 ... Whitespace in a regular expression using the /x modifier
m/\d+\w+/ is the same as m/ \d+ \w+ /x Who knew? PerlMonks, that's who!
3 ... perldoc
Not only is it a searchable website, but it's also a Unix-style manpage. It slices, it dices, it... Now I know what all that POD code is for!
2 ... perltidy (see Perl::Tidy)
and his side-kick xmltidy (see XML::Tidy). Imagine my surprise to find out that there are others out there as finicky as I am about coding style. Actually, "finicky" just doesn't quite describe it. More like obsessive-compulsive and completely paralyzed until I line up the curly braces and use consistent indentation in the code I inherited from some slovenly co-worker. Doesn't anyone care? Doesn't anyone have any self-respect? At least make it look like you know what you're doing (even if you don't)! ... Whew. Just had to get that off my chest. (Blood pressure dropping to normal levels now...)
1 ... PM is a place I can expand my Perl skills
I'm not a programmer. I don't really even work with programmers. But, I do enjoying hacking Perl every chance I get at work. So, to me, the Monastery is a nice intellectual sandbox where I can learn and be challenged.
0 ... It feels good to finally give back
Being able to help others by sharing my (limited) knowledge is truly satisfying. All right, all right, I'll admit that collecting XP is fun, too.
OK, so this is all blatantly obvious to masters of the Perl universe. But to those novices out there, just start using these techniques and you will enhance your life far beyond your wildest dreams. Well, that's a bit of an exaggeration, but you get the picture. As always, this is intended to help.