Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^5: Combining 3 filesby Anonymous Monk |
on Jun 27, 2011 at 10:27 UTC ( [id://911539]=note: print w/replies, xml ) | Need Help?? |
Hi anonymous monk, yes I'm still finding this confusing. Well hold onto your pants :) You mentioned it is confusing $dataset for a hashref. Look at the @beef equivalent example, it is this line that dies with Can't use an undefined value as an ARRAY reference This line is really I misspoke when I said it is confusing $dataset for a hashref , in actuality, $dataset is a hashref. The problem is, $key is not in $dataset, so $meat is undef Since meat is undef, trying to treat $meat as an array by de-referencing it, triggers a warning if you have warnings on, and triggers an error, if you have strict on. See References quick reference To avoid this error, you might add You don't want to disable strict :) Lets take apart a simpler example, one that builds @data aka aka is really or even
In Section
Seekers of Perl Wisdom
|
|