#! perl -w use warnings; use strict; use XML::XSH2; open "C:\\location\\test.xml" ; for /httpsRoutes/httpsRoute echo @hostname (key) @tier | cat > out.txt