#!/usr/bin/perl -w use strict; # print header information print "id\teval\tbegin\tend\n"; open(IN, 'guna_clolo_against_termite_metagenomics.tblastn') or die "Could not open file\n"; while (<IN>) { chomp; my @columns = split( /\t/, $_ ); if ( $columns[10] < 1E-10 ) { print "$columns[1]\t$columns[10]\t$columns[6]\t$columns[7]\n"; } } close IN;