Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm learning Perl for a web programming internship this summer (with a background in PHP). Though I'm comfortable learning new languages, my experience is that there are always useful and unique aspects of a language you don't find out about until you stumble upon them performing a certain task or happen to hear them from someone else.

Are there one or more Perl-specific features or quirks not included in the basic Perl skillset I should make sure I learn?

share|improve this question
You are polling for people's opinions, and that really doesn't work with the Q&A format of our site. Please read our FAQ thoroughly, especially the "What kind of questions should I not ask here?" section. – Yannis Rizos Apr 18 '12 at 15:48
Instead of closing the question you could have suggested I rephrase it to a more constructive format first. I was careful to try to make it as objective as possible, but would have happily improved it. – jandjorgensen Apr 18 '12 at 15:56
Sorry, but there isn't an actual practical problem to be solved here, this is a discussion not a question. – Yannis Rizos Apr 18 '12 at 15:59
Would it be appropriate to do a community wiki of unique aspects of Perl? – jandjorgensen Apr 19 '12 at 3:51

closed as not constructive by World Engineer, Walter, Yannis Rizos Apr 18 '12 at 15:47

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

1 Answer

I recommend using Perl's variants on if-then-else.

Instead of:

if (condition) { short-true-clause; }

you should write:

short-true-clause if condition;
#or
short-true-clause unless condition;

That makes for much more readable code when you've got a lot of tests to make.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.