Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 ( #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.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://162204]
help
Chatterbox?
[Discipulus]: you are right 1nickt i didnt voted nor downvoted; I just upvote perl content i like
[1nickt]: In Spanish, to argue (like a fight) is discutir -- does not mean to discuss !
[1nickt]: Sigh, this is why I gave up human-only languages and became a Perl linguist :-)
[Discipulus]: i just, rarely, downvote unpolite posts and spam, and wrong advices
[Discipulus]: discutere in eatalian is neutral: but discutere with wife sounds implicitly negative..
[erix]: what's the offending signature?
[Discipulus]: 'give man a fish erix it sonds like a push towards omosexuality.. ;=)
[Discipulus]: see Re: from txt file to array erix
[erix]: yeah, I ask for the text (I don't see signatures)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-06-22 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.