Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: Perl oddities

by DentArthurDent (Monk)
on Mar 01, 2005 at 21:28 UTC ( #435622=note: print w/replies, xml ) Need Help??

in reply to Re^2: Perl oddities
in thread Perl oddities

I would argue that if the condition is "really long and boring", then it is *more* important to have braces and whitespace so it is easier to see where the actual action being taken is at a glance. The only one you mention that could work for me is:
do_something_useful() if really_long_and_boring_condition;
Unfortunately, that's at the expense of putting the cart before the horse IMHO. The action doesn't matter if the condition is not satisfied.
My mission: To boldy split infinitives that have never been split before!

Replies are listed 'Best First'.
Re^4: Perl oddities
by PhilHibbs (Hermit) on Mar 21, 2005 at 17:39 UTC
    When I see "die if (long && complicated condition)" I know that I can stop reading the condition, because it's an error check and therefore probably not interesting to me. Or, if it says "$name = $1 if /long and complicated regex/;" then I can skip over the regex because I know what it's doing.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://435622]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2016-10-24 23:39 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (311 votes). Check out past polls.