my $value; eval { $value = $record1->getAttribute('value1'); }; if ( $@ ) { next FILE if ( $@ =~ /^duplicate attribute/ ); die $@; }