NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Not Clever, Just a Style (Score:2)
Personally, I hate the style where you test something at the beginning of a statement and then do something if it's true by using
and. I much prefer usingiforunlessat the end of a statement:I use this style all the time. But I have to say, I don't think that your original example was clever, but indicative of someone who prefers a different style of handling one-line conditionals. I would even argue that it's not really idiomatic Perl, but it's not in any way clever.
--Theory
Reply to This