Dear all, I am getting a new error regarding the PRINT function. I have never had this error and have gotten no clue from a bit of googling. Any help is appreciated.

Can't locate object method "PRINT" via package "IO::File" at addFeatInfo2clusterinfo.pl line 63.

use strict; use warnings; use Data::Dumper; my $in_clustInfo=$ARGV[0] || "output.clusterinfo"; open (IN,"<" ,$in_clustInfo); my %HoMS2lines; while (my $line=<IN>){ chomp $line; my @cols=split(/\t/,$line); my $clust_indx=$cols[0]; my $mz=$cols[2]; my $rt=$cols[15]; $HoMS2lines{$clust_indx}{mz}=$mz; $HoMS2lines{$clust_indx}{rt}=$rt; $HoMS2lines{$clust_indx}{line}=$line; } #print Dumper(%HoMS2lines); close(IN); ## my $in_featsInfo=$ARGV[1]; open (IN,"<" ,$in_featsInfo); my %HoMS1feats; while (my $line=<IN>){ chomp $line; my @cols=split(/\t/,$line); my $mz=$cols[5]; my $rt=$cols[6]; my $feat=$cols[4]; my $metab=$cols[10]; $HoMS1feats{$feat}{mz}=$mz; $HoMS1feats{$feat}{rt}=$rt; $HoMS1feats{$feat}{metab}=$metab; $HoMS1feats{$feat}{line}=$line; } close(IN); #print Dumper(%HoMS1feats); ## my $out="$in_clustInfo.featsadded.txt"; open (OUT,">",$out); ## my $mz_ppmWin=10; my $rt_win=10; foreach my $clust (keys %HoMS2lines){ my $mz=$HoMS2lines{$clust}{'mz'}; my $mz_win=($mz*$mz_ppmWin)/1000000; my $rt=$HoMS2lines{$clust}{'rt'}; foreach my $feat (keys %HoMS1feats){ my $ftmz=$HoMS1feats{$feat}{'mz'}; my $ftrt=$HoMS1feats{$feat}{'rt'}; my $ftmetab=$HoMS1feats{$feat}{'metab'}; if (($ftmz < $mz+$mz_win && $ftmz > $mz-$mz_win) && ($ +ftrt < $rt+$rt_win && $ftrt > $mz-$rt_win)){ PRINT OUT join("\t",$HoMS2lines{$clust}{'line' +},$feat,$ftmz,$ftrt,$ftmetab)."\n"; } else{ PRINT OUT join("\t",$HoMS2lines{$clust}{'line' +},"no matchin feat","NA","NA","NA")."\n"; } } }

In reply to Can't locate print error by AWallBuilder

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.