|
|
| The stupid question is the question not asked | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
Welcome!
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.
In reply to Re: new to perl, need some help
by NetWallah
|
|