Getting error at 'if(exists..' condition that << Can't use string ("<?xml version='1.0' standalone='") as a HASH ref while "strict refs" in use >> . But same code works in most cases. Can anyone kindly suggest the reason for the issue?my $results = call_api(a,b); #call_api returns following xml which gets stored in $results. <?xml version='1.0' standalone='yes'?> <response> </one/two/value> ……… ……… <//one/two/value> <rc>0</rc> <region>AUS</region> <user>User1</user> </response> $num='/one/two'; $val='value'; if(exists $results{"$num"/"$value"}) { do something }
In reply to XML header parsing error by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |