Don't fret too much about style and clarity. It's not that there's no such thing as ugly code; but a learner has a lot of trouble knowing which is which. To be honest, even among the Enlightened, "clean code" is not a universally agreed-upon standard. And academic computing (i.e. what you learn in school) isn't what you do in industry. I work at a university, and what they teach the students varies significantly from what actually keeps the system running.
If you take the advice here, you'll have clean code for some acceptable value of "clean". The Monks aren't infallible, but they seem to have reached concensus on important points.
Whatever you do, don't let the urge to write "clean" or "maintainable" code lure you into writing some ugly abomination of brain-deadness. Don't be afraid to write good code just because it might be hard to understand. "Easy to maintain" is confused far too often with "grossly inefficient and overly verbose", especially in academic circles. Far too many people are scared off by map or grep, because they wrongly consider it obscure. Good code is frequently not immediately transparent: that's not a bad thing. If you set out to write beautiful code, you'll find it's both clear and efficient, for acceptable values of "clear" and "efficient".
And Perl's more strongly typed than people seem to think. We just blur the issue with "contexts" and limit the types to scalars, lists, hashes, functions, etc. Lisp, sh, and Forth are loosely typed: Perl is somewhere between them and Java.
In reply to Re^3: Not A Rockstar File Manipulator Today
by mpeever
in thread Not A Rockstar File Manipulator Today
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |