in reply to Printing last element of hash (unintentionally)
The biggest thing that stands out at me about this code is your use of $a .. $f for variable names. These are undescriptive and silly. Perhaps you should just use an array, as in my @record = split /::/, $data{$_}; (it's up to you to come up with a better array name, of course). Not only are the variables unhelpful, but using $a and $b is probably a bad idea. These variables are "special" due to their use in sort, and should not be used except for that purpose. For details on this, check perlvar.
As for the actual problem, I'm not sure why you're not getting all your data printed. Perhaps you're Suffering from Buffering.
Update: now that I see you've posted more (all?) of your code, another thing stands out at me. Where does $specifics come from? I don't see it assigned anywhere. Perhaps you're thinking it will be set to whatever value was submitted in your textarea input, but that doesn't happen automatically, you'd have to assign it yourself.
|
|---|