my $xml; #that variable should have the triple magic print $xml; #in scalar context, prints '<r><e1>t1</e1><e2></e2></r>' print $xml[0][1]; #prints the second child of root, '<e2></e2>' print $xml{r}{e1}; #prints '<e1>t1</e1>'
Is it possible to tie it in pure perl, without use xs and such perlguts? I think that read-only $xml variable could be very handy...
Edit: g0n - Added code tags
In reply to tie and magic by pajout
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |