|We don't bite newbies here... much|
Re: new to perl, need some helpby NetWallah (Monsignor)
|on Oct 02, 2012 at 04:19 UTC||Need Help??|
The first thing monks will tell new perl programmers is to always
That said, your problem is the use of
inside the loop. That re-initializes the @values array each time.
Move that outside the loop, and initialize it like this:
The Parens are not necessary - perl initializes it to an empty array anyway.
Also, you code could be shortened if you used the "map" and "grep" functions, but I expect you have a ways to go before you are comfortable with them.
But first - get your program working.
Cheers, and all the best.
I hope life isn't a big joke, because I don't get it.