Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Pearls (not really) of Perl programming

by Juerd (Abbot)
on Nov 25, 2004 at 17:06 UTC ( [id://410425]=note: print w/replies, xml ) Need Help??


in reply to Pearls (not really) of Perl programming

reverse $str;

That doesn't affect $str. Does this come from production or otherwise tested code?!

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Pearls (not really) of Perl programming

Replies are listed 'Best First'.
Re^2: Pearls (not really) of Perl programming
by ikegami (Patriarch) on Nov 25, 2004 at 17:56 UTC
    Have another look. This thead is discussing bad code. (I was confused a little a first too.) reverse $str not doing anything is exactly the point.

      This thead is discussing bad code.

      That I gathered. I was wondering where this example came from. I find it hard to believe it was encountered in the wild. Conceived examples work, but they aren't as good, IMO.

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      Perhaps, although even if it did work, it would be a lot less clear than a substr, IMO.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found