in reply to refs and hashes
I think it should be something like# find all the entities in the current file if (/entity\s+(\w+)\s+is/i) { $1{'name'} = $1; $1{'fname'} = $vhd_file; push @entities, \%1; }
perhaps using the Data::Dumper module would help to debug it, also I would use a hash of hashes rather than a separate hash for each entity.push @entities, \%{$1};
Hope this is of some use Ay_Beeuse Data::Dumper; .... # find all the entities in the current file if (/entity\s+(\w+)\s+is/i) { $hash{$1}{'name'} = $1; $hash{$1}{'fname'} = $vhd_file; push @entities, $1; } .... close VHD; } print Dumper(%hash);
-_-_-_-_-_-_-_-_-_-_-_- My memory concerns me - but I forget why !!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: refs and hashes
by dragonchild (Archbishop) on Jul 29, 2002 at 14:32 UTC |