470,870 Members | 1,798 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,870 developers. It's quick & easy.

getting error when I m trying to feed 'awk' command in my perl script

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.
May 31 '12 #1
1 1450
Hello friends
I solved my problem. Thank you so much.
May 31 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Jeff Thur | last post: by
2 posts views Thread by ticars | last post: by
1 post views Thread by =?Utf-8?B?QmFydA==?= | last post: by
1 post views Thread by hbsnam | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.