Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Writing code that looks nice

by Your Mother (Archbishop)
on Apr 12, 2010 at 16:11 UTC ( [id://834307]=note: print w/replies, xml ) Need Help??


in reply to Re: Writing code that looks nice
in thread Writing code that looks nice

I think that's more idiomatic as

s/\A\s+|\s+\z//g for @strings; # or $string =~ /\A\s+|\s+\z//g;

For the OP: I prefer short, natural language code over formal blocks and such any day. But the point you get to at the bottom of it all is, there will be disagreement so consistency is best / don't edit other hackers' code for style; fit in with whatever codebase you have. (update, put in missing "/", thanks webfiend!)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-28 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found