noobnoob has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I'd seen my array returning the value like HASH(0x67890809)(for example), but I am not sure why. :(
I would expect the value to be some meaningful value like 0 or 1, is there any way that i can point my array to the data instead of hash value which seems like a memory address to me :-/
anyway...my array is something like this:
@array = XMLP::GetElementsByName($node, $path)and if I loop the below code, it doesnt gives me the output that i wanted, unless i take out the sort.
foreach $variable(sort @array) { $id= XMLP::Getelementbyvalue($variable); }
I am not interested to dive into the xml files to look at the function but I am very curious why a "sort" can somehow different from without sorting the array if the $variable return the hash value.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: why does array return the hash value?
by graff (Chancellor) on Apr 10, 2010 at 19:08 UTC | |
by noobnoob (Initiate) on Apr 11, 2010 at 15:50 UTC | |
|
Re: why does array return the hash value?
by JavaFan (Canon) on Apr 10, 2010 at 14:36 UTC | |
|
Re: why does array return the hash value?
by CountZero (Bishop) on Apr 11, 2010 at 07:14 UTC | |
by noobnoob (Initiate) on Apr 11, 2010 at 15:44 UTC | |
|
Re: why does array return the hash value?
by noobnoob (Initiate) on Apr 10, 2010 at 15:22 UTC |