in reply to file header change
Where exactly are you stuck?
Did you manage to open the file
Can you print the contents of the file from your script
Assuming that you can, all you need is:
if( $line =~ />contig_(\d+)\s/ ) { print ">$1\n"; } else { print "$lin +e\n"; }
In Section
Seekers of Perl Wisdom