my $resultFile= "C://Users/kullaniciadi/Desktop/plasmodium/results.txt +"; open (OUT, ">>$resultFile") or die ("Cannot open $resultFile"); open(geneREAD, $plasData) or die ("Cannot open $plasData"); my ($geneName, $line2, $epitope, $epiSeq, $locBeg, $locEnd); my $ctr; while($line2=<geneREAD>) { $ctr=0; chomp($line2); if($line2=~ m/^Gene:\s*(.*)/) { $geneName= $1; if(grep(/^$geneName$/, @geneArr)) { while(substr($line2, 0 , 3) ne "---") { $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}})#call some +values parsed earlier in the code from an array of hashes and compare + them with locBeg & locEnd { if($locBeg <= $HoProPos{$snpID} && $HoProPos{$ +snpID} <= $locEnd) { if($ctr== 0)#this $ctr thing is used to pr +int out gene's name only once in the output file {print OUT "Gene: $geneName\n";} print OUT "SNP $snpID found in epitope $ep +itope at protein position $HoProPos{$snpID}\n"; $ctr=1; } } } } } } }

Well, this is the part with the file handle you are mentioning. I only changed *s to +s in the inner if as I told you. I somehow do not believe that the warnings thrown pointing to dashed lines (in the .* version of the code) of the doc has anything to do with this filehandle, since it looks pretty simple and easy.

Thank you for your help. Looks much more better with new declarations and changes. Hopefully I'll get used to it over time.


In reply to Re^2: Argument "" isn't numeric in numeric le (<=) by hotel
in thread 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.