views:

95

answers:

1

Hi,

I'm facing a strange problem while using XML::Simple module of Perl.

I am writing an Asterisk AGI script in Perl where I am calling a function someSub() which uses curl to fetch XML from a CGI page into a variable $xmlstream.

I then use XMLin on $xmlstream. The code is something as shown below:

$xmlstream = someSub() ; #uses curl to fetch xml from a cgi page

$xmldata = XMLin($xmlstream, forcearray => 1, suppressempty => '');

This works. But, later on in my program when I use the above two lines to fetch new data, the AGI script suddently terminates while executing the second line.

What could be the cause of this bug? Any help would be really appreciated.

Thank You

A: 

Could you please 'use diagnostics' in your Perl program. Reference: http://perldoc.perl.org/diagnostics.html

Bart J