http://www.perlmonks.org?node_id=932677


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"