in reply to Re^4: Read the attribute from xml file
in thread Read the attribute from xml file

and typos, oh boy
while( my( $att, $attref ) = each %{ $event->{attribute} }){ print "$att required " if $attref->{required}; }