use strict; use XML::Simple; use NET::Telnet; my $xmlobj = XML::Simple->new(); my $xmldoc = $xmlobj->XMLin('./sample.xml'); .... etc etc.........