brant_chen has asked for the wisdom of the Perl Monks concerning the following question:
---------------------------------------------------#!/usr/bin/perl -w use warnings; sub total { my(@arr)=@_; my $result; foreach (0..$#arr){ $result += $arr[$_]; } return $result; } my @fred = qw(1 3 5 7 9); my $fred_total = total @fred; print "The total of \@fred is $fred_total.\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why I see anything in Variable View in EPIC?
by brant_chen (Initiate) on Dec 16, 2008 at 01:27 UTC | |
by Anonymous Monk on Dec 16, 2008 at 07:14 UTC |