Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Multiple Conditional Statements

by vsespb (Chaplain)
on Sep 11, 2013 at 11:07 UTC ( #1053461=note: print w/ replies, xml ) Need Help??


in reply to Multiple Conditional Statements

possible solution:
use strict; use warnings; my ($x, $y, $z, $w) = (1, 2, 3, 4); my @A = sort { $a <=> $b } $x, $y, $z, $w; my $ok = 1; while (@A) { $ok = 0 if @A >= 2 && $A[0] == $A[1]; shift @A; } print $ok;
UPD:
fixed: sort should be numerical.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2016-06-30 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (394 votes). Check out past polls.