Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: John Guttag's book - 2nd exercise. My attempt in Perl.

by duelafn (Parson)
on May 20, 2017 at 21:44 UTC ( [id://1190766]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use 5.010;
    
    ...
    else {
        say "All numbers are even!";
    }
    
  2. or download this
    my @nums = (-11, -13, 4);
    my @candidates = sort { $a <=> $b } grep $_ % 2, @nums;
    ...
    } else {
        say "They're all even!";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190766]
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: (6)
As of 2024-04-20 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found