hello bytes friends,
I am trying to run simple perl script with linux command where I am using 'awk' command and my perl script is
------------------------------------------------
#!/usr/bin/perl -w
use strict;
while (my $line =<>) {
chomp $line;
my @list = split ('\t+',$line);
if ($list[0] == 9606 && $list[3] eq "BLAST_KEGG_DBLINKS_UniProt BLAST_UniProt_AC Ensembl_HGNC_UniProt_ID_(mapped_data_supplied_by_U niProt) Ensembl_UniProt_AC") {
print `zgrep ^"$list[0]\.$list[1]" protein.links.v9.0.txt.gz | sort -k3 | awk '($3>400){print}' | head -n100`;
}
}
----------------------------------------------------------
input file is
----------------------------------------------------------
9606 ENSP00000356489 AAO15524.1 Ensembl_protein_id
9606 ENSP00000329418 O15524 BLAST_KEGG_DBLINKS_UniProt BLAST_UniProt_AC Ensembl_HGNC_UniProt_ID_(mapped_data_supplied_by_U niProt) Ensembl_UniProt_AC
----------------------------------------------------------
in my perl script $3 signifies where score is bigger than 400 then they will print out and head -n100 means my output limit 100.
But I am getting error like this-
----------------------------------------------------------
Use of uninitialized value $3 in concatenation (.) or string at string_interaction.pl line 13, <> line 1.
----------------------------------------------------------
Can you please help me to figure out of this problem?
thank you in advance.
Pallab