Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: a question on style

by cleen (Pilgrim)
on Jun 13, 2000 at 04:00 UTC ( #17815=note: print w/replies, xml ) Need Help??


in reply to a question on style

Of course thats not bad, and if your really going for the non-cluttered, more style code
if ($x = $y) { print "$y = $x\n"; }
might look better as
print "$y = $x\n" if ($x = $y);
which is basically the same thing, but easyier to type and read.

but I always look at if/ifels/else statements as a good chance to put in some nifty debugging options, IE
if ($y eq $x) { print "$y = $x\n"; } elsif ($debug eq 1) { print "$y != $x\n"; }
but thats just my two cents.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-08-14 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?