![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re: Pushing an hash into an arrayby NetWallah (Canon) |
on May 14, 2013 at 03:28 UTC ( #1033392=note: print w/replies, xml ) | Need Help?? |
Welcome to the Monastery! $element contains "Battery Failure". There is no such key in %error_code, so $error_code{$element} returns undef. The nearest valid key would be "SysBatteryFailure" , so you need to figure out how to get that into $element. ALso, you need to decide if @ILO_ERRORS has a hashref element, or is a simple array. You are attempting to use it both ways. After you get $element set correctly, if you want to use @ILO_ERRORS as an array, try: To get $element to work right, you could try:
"I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
In Section
Seekers of Perl Wisdom
|
|