#!/usr/bin/perl -w use strict; use XML::Twig; XML::Twig->new( start_tag_handlers => { _all_ => sub { print join( ' - ' => values %{$_->atts}), "\n"; } } ) ->parse( \*DATA); __DATA__ text text text