use strict; use warnings; open my $fh, '<', 'kegg_pathway_title.txt' or die $!; while (<$fh>) { print $.,' ',$_ if /\t/;}