sub parse { my ($twig, $result) = @_; print $result->first_child('target')->att('type'); #funktioniert # Das folgende gibt leider nicht das richtige aus: my $target = $result->first_child('target'); print "$target->att('type')"; }