#!/usr/bin/perl print "Enter an input file, space, and output file\n"; use strict; use warnings; chomp(my $enter = ); $_ = $enter; unless (m#.+\.nml .+\.xml#) {print "Unreadable input"; } my @fields = split(/ /, $enter, 9999); use XML::Twig; open (FILE, $fields[0]) or die "Can't open file"; my $file = ; my $t= XML::Twig->new( twig_roots => { "djn-geo" => 1}); $t->parsefile($file); open(STDOUT, ">$fields[1]"); $t->print;