Welcome to Dream.In.Code
Become an Expert!

Join 149,513 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,359 people online right now. Registration is fast and FREE... Join Now!




Bad index while coercing array into hash

 
Reply to this topicStart new topic

Bad index while coercing array into hash, Empty tag

eXceed69
16 Aug, 2007 - 01:03 PM
Post #1

"Super Sentai Knight Of DawN"
Group Icon

Joined: 12 Nov, 2006
Posts: 682



Thanked: 1 times
Dream Kudos: 675
My Contributions
I’m getting the following error when running a script using an anonymous array of hashes. "Bad index while coercing array into hash", I encounter on part this part of the code. Which the only purpose was to gets the data to an xml files and assign it to a variable.

If I passed an empty data it would error out just like this is that possible or any idea.

CODE

$rejXTags = $data->{getINFO}->{SUBJ}->{BODY}->{CONCERN}->{ERROR_INFO}->{ERROR_DESC};


User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Bad Index While Coercing Array Into Hash
16 Aug, 2007 - 01:36 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,655



Thanked: 313 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Perhaps if you use Data::Dumper on the elements there you can get a better idea what is going on. You can also check out the web link below which is somewhat similar to what you are doing and look at how they attacked it.

Hope this works for you.

Coercing array into hash error, using data dumper to help pinpoint problem
User is offlineProfile CardPM
+Quote Post

KevinADC
RE: Bad Index While Coercing Array Into Hash
17 Aug, 2007 - 11:43 AM
Post #3

D.I.C Head
Group Icon

Joined: 23 Jan, 2007
Posts: 238



Thanked: 6 times
Dream Kudos: 50
My Contributions
Are you sure it's not an array of hashes of arrays?
User is offlineProfile CardPM
+Quote Post

eXceed69
RE: Bad Index While Coercing Array Into Hash
18 Sep, 2007 - 12:09 AM
Post #4

"Super Sentai Knight Of DawN"
Group Icon

Joined: 12 Nov, 2006
Posts: 682



Thanked: 1 times
Dream Kudos: 675
My Contributions
It's a array of hash in a array
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 07:51PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month