http://qs1969.pair.com?node_id=834307


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!)