in reply to Values not printing.
The expression on the left is in scalar context. Thus, the array on the right is evaluated in scalar context, so you store the size of the array, not the elements. Try using this line instead:$hash3{$vars[2]} = (@vars[0,1]); #add 1,2,3 as needed
UPDATE: As sierrathedog04 notes, it is the last element of the list that was previously stored, not the size.@{$hash3{$vars[2]}} = (@vars[0,1]); #add 1,2,3 as needed
-Ton
-----
Be bloody, bold, and resolute; laugh to scorn
The power of man...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Values not printing.
by sierrathedog04 (Hermit) on Apr 13, 2001 at 02:07 UTC | |
|
Re: Re: Values not printing.
by qball (Beadle) on Apr 13, 2001 at 00:53 UTC | |
by ton (Friar) on Apr 13, 2001 at 01:11 UTC |