Comment has asked for the wisdom of the Perl Monks concerning the following question:
Thank you all again in advance for your help
I am currently using the Spreadsheet::Read module to pull in data from an excel sheet. I would like to put my data points into a hash table as follows:use Spreadsheet::Read; my %pointData{D.xls} = ReadData(fileD.xls) my %coordinates = ( x1 => $pointData(D.xls)->[1]->{A1}, y1 => $pointData(D.xls)->[1]->{A2}, z1 => $pointData(D.xls)->[1]->{A3}, );
This is a simplification of my code, but it should be an accurate representation. When I try to run the script and print x1 using print "$coordinates{x1}";, it tells me that $coordinates{x1} is uninitialized. I was wondering if anyone sees something wrong with my code that could be causing this. I am assuming that I am missing an obvious thing, but I have read through a lot of documentation and still cannot figure it out
Many Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereferencing within Hash Assignment
by Your Mother (Archbishop) on Sep 24, 2010 at 20:10 UTC | |
by Comment (Novice) on Sep 24, 2010 at 20:13 UTC | |
|
Re: Dereferencing within Hash Assignment
by toolic (Bishop) on Sep 24, 2010 at 19:59 UTC | |
by Comment (Novice) on Sep 24, 2010 at 20:05 UTC | |
|
Re: Dereferencing within Hash Assignment
by Anonymous Monk on Sep 24, 2010 at 20:46 UTC |