my $xml; #that variable should have the triple magic print $xml; #in scalar context, prints 't1' print $xml[0][1]; #prints the second child of root, '' print $xml{r}{e1}; #prints 't1'