#!/usr/bin/perl use strict; use warnings; # subroutine to build AoA # example data from file being used # InterPro:IPR000005 Helix-turn-helix, AraC type > GO:regulation of transcription, DNA-dependent ; GO:0006355 # InterPro:IPR000005 Helix-turn-helix, AraC type > GO:intracellular ; GO:0005622 # InterPro:IPR000006 Vertebrate metallothionein > GO:metal ion binding ; GO:0046872 # note from a VERY large file my @i2g; my @miniarray; my @i2glines; my $line; my ($ipid,$ipdesc,$godesc,$goid); open (FILE, "interpro2go.txt"); @i2glines = ; foreach $line (@i2glines) { if ($line =~ /\s*InterPro\:(\S+)\s(.+) > (.+) ; (.+)/){ my ($ipid,$ipdesc,$godesc,$goid); @miniarray = ($ipid, $ipdesc, $godesc, $goid); push @i2g, [ @miniarray ]; } } print "job done? Doing something but the correct thing?"; print @i2g; # !!!!!!!!!!! return for use to the main prog keeping AoA avaliable to the main_processing (na other subroutine!! close FILE; exit;