my $cont = $XML->{foo} ; ## ...or... my $cont = $XML->{foo}->content ; print "<<$cont>>\n" ; ## print: <> $content .= 'x' ; ## Append data.