#!/bin/perl -w use strict; use XML::Simple; use Data::Dumper; my $doc= XMLin( './file.xml'); # you need to specify the path to the file print Dumper( $doc);