Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: Can If-then conditions do ($a = $b = $c) type expressions?

by premchai21 (Curate)
on Apr 26, 2002 at 07:10 UTC ( [id://162204]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Can If-then conditions do ($a = $b = $c) type expressions?
in thread Can If-then conditions do ($a = $b = $c) type expressions?

If I'm not mistaken, it was specified in the original node that e was looking for alternatives to the method in your post. Most likely TheDamian's solution is the most readable and concise, but it uses a non-core module, which can be problematic in some situations. What I posted was just another WTDI.

Yes, I would remember what it meant six months afterward; if there were any chance someone else would have to maintain it, I would most likely abstract it into a subroutine, or at least put a comment there (see below).

And while in almost all cases the original method (the same as yours) is more readable, at some point the number of equalities being tested becomes unwieldy, and it becomes more efficient readability-and-writability-wise to abstract the test out into a grep.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-28 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found