Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: guidelines for inline coding

by misterperl (Pilgrim)
on Sep 26, 2014 at 13:59 UTC ( [id://1102135]=note: print w/replies, xml ) Need Help??


in reply to Re: guidelines for inline coding
in thread guidelines for inline coding

Thanks monks for all of the insight and advice, it's all most appreciated. I guess bottom-line is as advised, the inline statements are only for simple cases. In general I want my code to look more like an sentance than code, like Englishizing:
if ( $cat ) { $dog='onALert'; }
to
$dog='onALert' if $cat;
its so much cleaner, easier to read. It would be even nicer if "is" could substitute for =", (sort of like SQL "is NULL") then:
$dog is 'onALert' if $cat; $dog is 'sleeping' unless $cat;
Nice! Thanks guys for the insight- I'm just syntax-surfing techniques to pretify my code...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-24 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found