in reply to Re: Re: Hashes and Arrays
in thread Hashes and Arrays
First of all, you should probably add a 'use strict;' at the top of your code. It will show you a couple of problems with the code you presented above.
Second, if you are having problems with data structures, and they are not doing what you want, use Data::Dumper to see what is actually happening. Add the following code snippet after you have built your data structure:
use Data::Dumper; print Dumper(\%newhash);
When I ran your code with this, it gave me the following:
$VAR1 = { 'IP' => [ 'value1', 'value2', 'value1', 'value2' ] };
So the code is not doing what think it is doing.
I hope that gives you enough to continue.
- Cees
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Hashes and Arrays
by datannen (Novice) on Jul 17, 2003 at 01:20 UTC |