my $test = '10GBE_ADDR1'; #decide if first part of line has ABC901X_ ... print "new record\n" if $test =~ m/^[A-Z0-9a-z]+_/;