Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Whats the average time taken to learn Perl?

by tobyink (Canon)
on Dec 19, 2012 at 01:22 UTC ( [id://1009479]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Function to add a list of numbers together
    sub sum {
    ...
        }
        return $sum;
    }
    
  2. or download this
    use List::Util 'reduce';
    sub sum {
        my @numbers = @_;
        return reduce { $a + $b } @numbers;
    }
    
  3. or download this
    sub sum {
        my $sum;
        $sum += $_ for @_;
        return $sum;
    }
    
  4. or download this
    use List::Util 'sum';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found