in reply to new to perl, need some help
The first thing monks will tell new perl programmers is to always
use strict;
use warnings
at the start of each program.
That said, your problem is the use of
inside the loop. That re-initializes the @values array each time.@values = ();
The Parens are not necessary - perl initializes it to an empty array anyway.my @values = ();
I hope life isn't a big joke, because I don't get it.
-SNL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: new to perl, need some help
by kingpin007 (Initiate) on Oct 02, 2012 at 04:28 UTC | |
|
Re^2: new to perl, need some help
by bimleshsharma (Beadle) on Oct 02, 2012 at 12:05 UTC |