in reply to Re: Debugging help!
in thread Debugging help!
So I've rewritten my code and it looks like this:
The error codes changed. Now they say this.#!/usr/bin/perl use Modern::Perl; use File::Slurp qw/read_file write_file/; my $uniprot = 'uniprot-sfinal.txt'; my $activin = 'Activator-PFAM.txt'; my $antioxin = 'AntiOxidant-PFAM.txt'; my $toxinin= 'Toxin-PFAM.txt'; my $activout = 'ActivACNPF.txt'; my $antioxout= 'AntioxACNPF.txt'; my $toxinout= 'ToxinACNPF.txt'; my @activline; my @antioxline; my @toxinline; my %activ = map { s/\.\d+//g; $1=>$2 if/(.+)\s+\|\s+(.+)/; } read_file + $activin; my %antiox = map { s/\.\d+//g; $1=>$2 if/(.+)\s+\|\s+(.+)/; } read_fil +e $antioxin; my %toxin = map { s/\.\d+//g; $1=>$2 if/(.+)\s+\|\s+(.+)/; } read_file + $toxinin; for ( read_file $uniprot ) { /(.{6})\s+.+=([^\s]+)/; push @activline, "$1 | $2 | $activ{$1}\n" if $activ{$1}; push @antioxline, "$1 | $2 | $antiox{$1}\n" if $antiox{$1}; push @toxinline, "$1 | $2 | $toxin{$1}\n" if $toxin{$1}; } write_file $activout, @activline; write_file $antioxout, @antioxline; write_file $toxinout, @toxinline;
Odd number of elements in hash assignment at ARP//positivedatasetextra +ctor.pl line 18. Odd number of elements in hash assignment at ARP//positivedatasetextra +ctor.pl line 20. Odd number of elements in hash assignment at ARP//positivedatasetextra +ctor.pl line 23. Odd number of elements in hash assignment at ARP//positivedatasetextra +ctor.pl line 24. Odd number of elements in hash assignment at ARP//positivedatasetextra +ctor.pl line 25.
The lines with the errors are still the same.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Debugging help!
by NetWallah (Canon) on Aug 31, 2012 at 14:35 UTC | |
Re^3: Debugging help!
by aitap (Curate) on Aug 31, 2012 at 14:32 UTC |
In Section
Seekers of Perl Wisdom