#!/usr/bin/perl # get the sccession numbers from the blast results while (<>){ chomp; s/\.\.+//; my @line = split /\s+/; pop @line; pop @line; my $first = shift (@line); my @numbers = split /\|/, $first; $accNum = $numbers[3]; $accNum =~ s/\.\d+$//; print "$accNum\t\t# " . join(" ", @line) . "\n"; }