#!/usr/bin/perl use strict; use warnings; open (FILE, 'interpro2go.txt') || die 'cannot open file'; my @i2g; foreach my $line () { if ($line =~ /\s*InterPro\:(\S+)\s(.+) > (.+) ; (.+)/) { push @i2g, [$1, $2, $3, $4]; } } print @i2g; close FILE; exit 0;