sub uniprot2go { my $uniprotIDref = $_[0]; my %uniprotIDS = %{$uniprotIDref}; my %GOAssoc; open(ASSOC, "<$ASSOCIATIONS"); foreach my $line () { my @fields = split(/\t/. "$line"); # if ($fields[0]=~"UniProt" ) { # push (@{$GOAssoc{$fields[1]}}, $fields[4]); # } } return \%GOAssoc; } This is the line it chokes on: UniProt Q9NWU1 OXSM_HUMAN GO:0004315 PMID:15668256 IDA FOXSM: 3-oxoacyl-[acyl-carrier-protein] synthase, mitochondrial precursor IPI00016637 protein taxon:9606 20060109 HGNC And this is the error: Invalid [] range "l-c" in regex; marked by <-- HERE in m/UniProt Q9NWU1 OXSM_HUMAN GO:0004315 PMID:15668256 IDA F OXSM: 3-oxoacyl-[acyl-c <-- HERE arrier-protein] synthase, mitochondrial precursor IPI00016637 protein taxon:9606 20060109 HGNC / at ./NEI-GO.pl line 130, line 165128.