#!/usr/bin/perl use XML::Simple; use ContentHelper; use XML::Parser; @files = `ls`; # Sub substitution to check for duplicates foreach $input_file (@grepNames){ chomp $input_file; my $xml_parser = XML::Simple->new(); my $data = $xml_parser->XMLin($input_file); my $Id = $data->{"root"}->{'id'}; my $date = $data->{'root'}->{'date'}; my $time = $data->{'root'}->{'time'}; ### Please tell me how to add the condition here. print "$input_file:$Id:$time:$date\n\n"; }