http://www.perlmonks.org?node_id=964302


in reply to Parse handler for Attributes in XML

All the attributes are in the hash %attrs:
for my $attr (keys %attrs) { if ($attr eq 'command') { print "Command: $attrs{$attr}\n"; } }
To access a specific attribute (e.g. command) just say:
my $command = $attrs{command};