Re: multidimensional insertion order



Paul Lalli wrote:
You're attempting to tie a reference to a hash to the Tie::IxHash
class.  A reference is a scalar.  Therefore, tie() is attempting to use
a non-existant TIESCALAR method.

You *want* to tie the hash that that reference references to the
Tie::IxHash class.

Try: (untested)

tie %{$xml_lines{$section}->{$section_number}}, "Tie::IxHash";


That truncates the hash somehow.

Using Data::Dumper this is the output from what you suggested above:

%xml_lines = (
'Header' => {
'1' => {
'DOB' => '05/05/02'
}
},
'Gross Necropsy' => {
'1' => {
'Clinician' => 'Joe Nobody, DVM',
'Report' => 'blah blah blah',
'Report_unparsed' => 'blah blah blah'
}
},
'Histopathology' => {
'1' => {
'Clinician' => 'Joe Nobody, DVM',
'Report' => 'blah blah blah',
'Report_unparsed' => 'blah blah blah'
}




OTOH if I comment the aggravating line out, Data Dumper shows:

%xml_lines = (
'Header' => {
'1' => {
'Sex' => 'Spayed Female',
'Date' => '07/28/05',
'Owner' => 'Joe Somebody',
'Breed' => 'Hedgehog',
'Species' => 'Insectivora',
'DOB' => '05/05/02',
'Patient' => 'Spikey*'
}
},
'Gross Necropsy' => {
'1' => {
'Sex' => 'Spayed Female',
'Template' => 'necropsy',
'Date' => '06/30/05',
'Clinician' => 'Joe Nobody, DVM',
'Owner' => 'Joe Somebody',
'Breed' => 'Hedgehog',
'Report_unparsed' => 'blah blah blah',
'Species' => 'Insectivora',
'DOB' => '05/05/02',
'Report' => 'blah blah blah',
'Patient' => 'Spikey*'
}
},
'Histopathology' => {
'1' => {
'Sex' => 'Spayed Female',
'Template' => 'necropsy',
'Date' => '07/11/05',
'Clinician' => 'Joe Nobody, DVM',
'Owner' => 'Joe Somebody',
'Breed' => 'Hedgehog',
'Report_unparsed' => 'blah blah blah',
'Species' => 'Insectivora',
'DOB' => '05/05/02',
'Report' => 'blah blah blah',
'Patient' => 'Spikey*'
}
}
);



I changed the output to maintain patient confidentiality; hopefully I didn't add any typos.


The $section_number is used for occasions when we have >1 report by the same name. For example, two surgery reports if the patient required two surgeries while hospitalized. You would understand how essential it is to have it kept in order at the Section_Number level.

TIA
Caleb
.



Relevant Pages

  • Re: Ray Davies says ...
    ... report what professional jocks and actors ... makes right, the world's policeman, blah, blah. ... >> ourselves yard monitor for the whole block. ... America, rebuild our cities, feed ...
    (alt.guitar.amps)
  • Re: Bobs Homework
    ... I can only imagine my embarrassment if I ever ... or my 8th grade report on Bolivia (La Paz is its ... and its main industries are textiles and sheep guts blah blah ...
    (rec.music.dylan)
  • Re: OT - Finally, a gun law...
    ... will agree with the law and report the sick clients. ... They're required to report patients who've threated violence during ... Read the rules at a large shopping mall ... we'll prosecute to the fullest extent of the law blah blah ...
    (alt.autos.toyota)
  • Re: OT - Craigslist crap
    ... requests for my address, blah, blah, blah so they can send a ... Now - I send them the address and phone number for my local police ... I report it to CL as well... ... And that's doesn't begin to cover those who do nothing but chuck out ...
    (alt.guitar)
  • Sub-Report wont always display..
    ... I am trying to dynamically assign a report resultset ... I have the sub-report 'link child fields - link master fields' functionality ... sqlstring = select blah from blah into blah ... select case toggle value ...
    (microsoft.public.access.reports)