Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Whats the average time taken to learn Perl?

by tobyink (Abbot)
on Dec 19, 2012 at 01:22 UTC ( #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
Node Status?
node history
Node Type: note [id://1009479]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (15)
As of 2014-12-22 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (121 votes), past polls