in reply to Re: Parsing XML
in thread Parsing XML
So this works great if there are multiple items (domains in this case) that return. I've got cases where only a singe domain will return and I get the following error:
Not an ARRAY reference at ./namecheap.pl line 99
Line 99 in the line my foreach loop begins on. In my uneducated opinion, it would be due to returning only a single result and referencing it using @. I've tried a few other stabs at being able to handle both a single and multiple results but can't come up with anything. My next guess is to try to find how long my results are (i.e. greater than one) and handle them separately...but that seems like a lot of redundant work having the exact same thing but for different results.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Parsing XML
by tangent (Parson) on Mar 11, 2014 at 02:06 UTC | |
by calebcall (Sexton) on Mar 11, 2014 at 04:27 UTC | |
|
Re^3: Parsing XML (XML::Rules xml2XMLRules )
by Anonymous Monk on Mar 11, 2014 at 02:20 UTC | |
by calebcall (Sexton) on Mar 11, 2014 at 04:29 UTC | |
|
Re^3: Parsing XML (XML::LibXML xpather )
by Anonymous Monk on Mar 11, 2014 at 02:42 UTC |