printf "%d duplicate records written\n",$name,$para,$out_filename;
see printf and sprintf. You need to put %s in the print format for strings, %d for integers
while ( my $para = <$PROTFILE> ) {
# Remove fasta header line
if ( $para =~ s/^>(.*)//m ){
$name = $1;
};
# Remove comment line(s)
$para =~ s/^\s*#.*//mg;
# Trim trailing white space
$para =~ s/\s+$//;
# next FASTA_RECORD if $fasta_seen{ $para }++;
if ( $fasta_seen{ $para }++ ){
printf "duplicate record %s %s \nwritten to %s\n",$name,$para,$out
+_filename;
print $OUTFILE '>'.$name.$para."\n\n";
}
}
poj