Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Sidhekin (Priest)
on Apr 25, 2002 at 20:28 UTC ( [id://162090]=note: print w/replies, xml ) Need Help??


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

$a = 5; $b = 5; $c = 5; if ((($a == $b ) + ($a -1)) == $c) { print "yes!!!\n"; }

Amel is one dangerous monk {grin} ... observe:

$a = 6; $b = 5; $c = 5; if ((($a == $b ) + ($a -1)) == $c) { print "yes!!!\n"; }

# given three equal variables if (($a == $b ) == ($b == $c)) { print "yes!!!\n"; }

Yeah, right, "given three equal variables". Given three different variables, however ...

$a = 6; $b = 4; $c = 5; if (($a == $b ) == ($b == $c)) { print "yes!!!\n"; }

++ for not saying you'd use this ;-)

Update:... and here I had finally convinced myself Amel had to be joking ... oh well ...
You're welcome to that ++ anyways — the joke is none the worse for being unintended ;)

The Sidhekin
print "Just another Perl ${\(trickster and hacker)},"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-19 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found