Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Can i do math with the elements of an array?

by Util (Priest)
on Oct 20, 2011 at 14:26 UTC ( #932677=note: print w/ replies, xml ) Need Help??


in reply to Can i do math with the elements of an array?

Yes.

my @z = ( 30, 18, 54, 24, 88 ); my $sum = $z[1] + $z[3]; print $sum, "\n"; # Prints "42"


Comment on Re: Can i do math with the elements of an array?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (16)
As of 2015-07-31 14:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls