Dear Monks,

I am new to Perl as I am new to this website. I actually can be considered new to programming even. I've been working on a Perl script for the last few days and now even though it works fine (as far as i understand from my outputs) it displays a warning that i cannot figure out the reason. Below you can find a part of the text file (the file consists of this motif only) that my script parses and my the piece of my code that seems to be the trouble maker.

The warning message i get from the command prompt is this:

.....(the same warning with different line numbers) ...........

Argument "" isn't numeric in numeric le (<=) at C:\Users\kullaniciadi\Desktop\pl

asmodium\plasm-backup.pl line 92, <geneREAD> line 2454.

Argument "" isn't numeric in numeric le (<=) at C:\Users\kullaniciadi\Desktop\pl

asmodium\plasm-backup.pl line 92, <geneREAD> line 2463.

Argument "" isn't numeric in numeric le (<=) at C:\Users\kullaniciadi\Desktop\pl

asmodium\plasm-backup.pl line 92, <geneREAD> line 2463.

......(the same warning with different line numbers)

Here is the input file:

Gene: PF14_0747

TABLE: Epitopes from IEDB

Epitope Sequence Location on Protein Strain Confidence

26850 IKND 1914-1917 Plasmodium falciparum 3D7 Medium

------------------------------------------------------------

Gene: PF14_0711

TABLE: Epitopes from IEDB

Epitope Sequence Location on Protein Strain Confidence

26850 IKND 9-12 Plasmodium falciparum 3D7 Medium

------------------------------------------------------------

and here is the essential piece of my code

my $ctr; while($line2=<geneREAD>) { $ctr=0; chomp($line2); if($line2=~ m/^Gene:\s*(.*)/) { $geneName= $1; #print "$geneName\n"; if(grep(/^$geneName$/, @geneArr)) { while(substr($line2, 0 , 3) ne "---") { #print "$line2\n"; $line2=<geneREAD>; chomp($line2); if($line2=~ m/(\d*)\s*([A-Z]*)\s*(\d*)-(\d*)/) { $epitope= $1; $epiSeq= $2; $locBeg=$3; $locEnd=$4; foreach $snpID(@ {$snpHash{$geneName}}) { #print "$snpID $HoProPos{$snpID}\n"; if($locBeg <= $HoProPos{$snpID} && $HoProPos{$ +snpID} <= $locEnd) { if($ctr== 0) {print OUT "Gene: $geneName\n";} print OUT "SNP $snpID found in epitope $ep +itope at protein position $HoProPos{$snpID}\n"; $ctr=1; } } #print "$1 $2 $3 $4\n" } } } } }
I do not understand how the line consisting of dashes enter the if in which i (should only) have two numeric values. Thank you for your time.

ps: Please warn me if i could not formulate the question well enough or if i didnt provide enough information/code or if i provided more than required, as this is my first post.


In reply to Argument "" isn't numeric in numeric le (<=) by hotel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.