Jeff 'Japhy' Pinyan wrote:
> On Nov 15, Paul Harwood said:
>
> >push @{$names{TEST}}, $another_name
> > unless grep ($another_name, @{$names{TEST}});
>
> >I thought that the $another_name scalar would be pushed once a grep of
> >the nested array shows that it doesn't already exist. How can I make
On Sat, Nov 15, 2003 at 11:33:15PM -0800, Paul Harwood wrote:
> I am trying to push an element into a nested array, but ONLY if it
> doesn't already exist.
A question of this nature usually suggests that you should be using a
hash instead of an array.
>I thought the best
On Nov 15, Paul Harwood said:
>push @{$names{TEST}}, $another_name
> unless grep ($another_name, @{$names{TEST}});
>I thought that the $another_name scalar would be pushed once a grep of
>the nested array shows that it doesn't already exist. How can I make
>this work?
That's because you're assu