in reply to Simple Totals Example (Help Needed)

You already have an answer to your question, but as you're new to Perl - here is a little bit of extra advice :)

Try to get into the habit of including:

use strict; use warnings;
at the start of every program and script that you write. By useing strict and warnings, you will save yourself many "head-banging" moments. For a good discussion on this, have a read of On Commenting Out 'use strict;' and the ensuing thread.

Cheers,
Darren :)