in reply to Re^2: Matching up XML tags in 2 arrays
in thread Matching up XML tags in 2 arrays
That's why ikegami suggested using a hash of arrays. If you push a new tag ID onto the array you will be able to track all occurrences without overwriting existing data. Your example would look something like this:
%text = ( 'He' => [ 1, 2 ], ...
If, on the other hand, you were using a straight hash:
then yes, the first tag would be replaced by the second.%text = ( 'He' => 1, ...
You may find perldsc and our Tutorials section (specifically Data Types and Variables) helpful.
|
|---|