use XML::Simple; my $x = XMLin('myxmlfile.xml'); print "This costs: " . $x->{item}->{cost} ."\n"; #### £300