Re: multidimensional insertion order



* Spin schrieb:
> Fabian Pilkowski wrote:
>>
>> Since you don't want to tie a reference [1], you have to tie a hash
>> instead. Try to dereference the whole hash with "%{}" first:
>>
>> tie %{ $xml_lines{$section}->{$section_number} }, "Tie::IxHash";
>
> Fabian, that's what I wondered so I tried that (see my previous post)
> but that chops off parts of my hash.

Right, I see it know. Last time I connected to my newsserver that
posting wasn't present.

This problem depends on your input data. You hadn't give us any example
thus we give you a first approach to what you want. Now, I assume you're
"re-tieing" your hash. By tieing a already tied hash, this hash will be
discharged. Could this be? Try to prevent this by using Perl's tied()
function to check whether your hash is already tied:

unless ( tied %{...} ) {
tie %{...}, 'Tie::IxHash';
}

or the one-line-version for that:

tie %{...}, 'Tie::IxHash' unless tied %{...};

regards,
fabian
.



Relevant Pages

  • Re: Time Calculations
    ... I do not appear to have any trouble with ... > Ideally I do not want to ann in date and times. ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: J4 - presentation/discussion on "Future of the COBOL Standard"
    ... I thought the L2 cache would make alignment a non-issue. ... chops: ... For small tables this can dominate the cost of the ... Hash tables also take more space than an array. ...
    (comp.lang.cobol)
  • Re: Religion in SF
    ... perhaps we can hash out our own definition or agree to disagree. ... The All-New, All-Different Howling Curmudgeons! ... Prev by Date: ...
    (rec.arts.sf.written)
  • Re: Can use use value to find key (HashTable)
    ... and the key for the value in order to do a reverse lookup like ... >I have a hash table like: ... > Hashtable myHT = new Hashtable; ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Police make dozens of arrests @ Rolling Stones concert.
    ... Hash is a ... byproduct of every harvest, not hard to find at all. ... Prev by Date: ...
    (rec.music.gdead)