L
Larry
I am really at a loss with the following. I have a big multidimendionas hash
made up like this:
$OI->{"dd/mm/yyyy"}->{"name"}->{"expire date"}->{"strike"}->{"type"} =
num_val
where TYPE can ben "Call" or "Put" and STRIKE is a numeric value.
I fill in that hash by parsing an xml file like this:
....
<OI date="04/10/2010" name="AAPL" exp_date="DEC2010" strike="320" call="30"
put="50" />
<OI date="04/10/2010" name="AAPL" exp_date="DEC2010" strike="320" call="100"
put="172" />
....
I need to create a table (plain text) out of that hash, something as follows
name: ( #workbook
expire date: ( #worksheet 1
strike type dd/mm/yyyy dd/mm/yyyy dd/mm/yyyy ..etc..
15 Call num_val num_val num_val
15 Put num_val num_val num_val
16 Call num_val num_val num_val
16 Put num_val num_val num_val
..etc..
)
expire date: ( #worksheet2
strike type dd/mm/yyyy dd/mm/yyyy dd/mm/yyyy ..etc..
15 Call num_val num_val num_val
15 Put num_val num_val num_val
16 Call num_val num_val num_val
16 Put num_val num_val num_val
..etc..
)
)
basicaly the STRIKE field is supposed to be sorted by ascending
and the DD/MM/YYYY is supposed to be sorted by older->newer
Any help will be appreciated on how to go about making that possible in
Perl!
thanks
made up like this:
$OI->{"dd/mm/yyyy"}->{"name"}->{"expire date"}->{"strike"}->{"type"} =
num_val
where TYPE can ben "Call" or "Put" and STRIKE is a numeric value.
I fill in that hash by parsing an xml file like this:
....
<OI date="04/10/2010" name="AAPL" exp_date="DEC2010" strike="320" call="30"
put="50" />
<OI date="04/10/2010" name="AAPL" exp_date="DEC2010" strike="320" call="100"
put="172" />
....
I need to create a table (plain text) out of that hash, something as follows
name: ( #workbook
expire date: ( #worksheet 1
strike type dd/mm/yyyy dd/mm/yyyy dd/mm/yyyy ..etc..
15 Call num_val num_val num_val
15 Put num_val num_val num_val
16 Call num_val num_val num_val
16 Put num_val num_val num_val
..etc..
)
expire date: ( #worksheet2
strike type dd/mm/yyyy dd/mm/yyyy dd/mm/yyyy ..etc..
15 Call num_val num_val num_val
15 Put num_val num_val num_val
16 Call num_val num_val num_val
16 Put num_val num_val num_val
..etc..
)
)
basicaly the STRIKE field is supposed to be sorted by ascending
and the DD/MM/YYYY is supposed to be sorted by older->newer
Any help will be appreciated on how to go about making that possible in
Perl!
thanks