in reply to pondering array population
Whoop!
thanks for the replies, people
I didn't know there was a grep function in Perl!
sub change_punch_process { my %transactions; my @numbers; foreach (sort ($q->param)) { if (/^([0-9]+)/) { push (@numbers,$1) unless grep /\b$1\b/, @numbers; } } print "<br><br>@numbers"; }
As, grantm said, I kept putting in the same numbers over and over.
IMO, a hash would be overkill. I just need the numbers to append my CGI variables.
That grep statement should work right?
At least it is so far.
Thanks again!
Elam Ooops! didn't see your reply sensate. Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: pondering array population
by chromatic (Archbishop) on Nov 22, 2002 at 01:21 UTC |