in reply to Re^4: Question on XML output using Perl
in thread Question on XML output using Perl

If there is no error excerpt:
#!/usr/bin/perl use strict; use warnings; use XML::Simple qw(:strict); sub new { my ($class) = @_; #my ($proto) = @_; #to make the constructor both class and object method #my $class = ref($proto) || $proto; my $self = { #attributes of object _id => undef, _user_scenario => undef, _result_type => undef, _result_log_link => undef, _not_exposed_reason => undef, _error_excerpt => undef, _triage => undef, }; bless $self, $class; return $self; } sub error_excerpt { } if ( defined('_error_excerpt') ) { print "error Excerpt\n"; } else { if ( not defined('_error_excerpt') ) { print "No error Excerpt exists\n"; } }