#!/bin/perl -w use strict; use XML::TokeParser; #parse from open handle my $p=XML::TokeParser->new(\*DATA,Noempty=>1); #skip to my $tag= $p->get_tag('Root'); my $atts= $tag->[1]; # that's where the atts are, look at the docs while( my( $att, $value)= each %$atts) { print "$att -> $value\n"; } __DATA__ Premium