http://www.perlmonks.org?node_id=1017097


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"; }