#...xml handling... my $XMLRead = XML::Smart->new("C:\\Temp\\TestFile.xml", 'XML::Smart::Parser'); my $sendername = $XMLRead->{'MSR-ISSUE'}{'SHORT-NAME'}; my $encoded_string = encode("cp1250", $sendername); print $encoded_string;