Dear Monks--
Solved it! Wasn't a hash/array problem at all -- though I'm still not sure why I couldn't print out a list of keys. Anyway, it's working now...
Thank you for all your comments: I know there are better ways of doing things; I'm trying to set the basic thing up first, & then I'll clean it up. What I don't understand is how my code is different from Larry Wall's in PROGRAMMING PERL. Here is his code:
for $group ( "simpsons", "jetsons", "flintstones" ) {
@members = get_family($group);
$HoA{$group} = [ @members ];
}
Do I need to dereference something here to get at it ?
For those who are wondering, @array2 has this kind of data:
"0451524934","1984",7.9500,67,"Penguin Putnam"
"0618056815","42nd Parallel",13.0000,25,"Houghton Mifflin"
"0195167929","A Strange Likeness - Becoming Red and White in Eighteent
+h Century",29.9500,0,"Oxford University Press"
"0520204026","Abortionist : A Woman Against the Law",25.0000,30,"Unive
+rsity of California Press"
Later in my program I push stuff from @array1 onto each array in %Tex. At least in theory. It's weird how many examples, particularly of MySQL, use book information as examples, because that's what I am -- a bookseller.
jdporter added code tags around the data
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.