Loading ...
Sorry, an error occurred while loading the content.

array error.

Expand Messages
  • Mirza Abdullah Jan
    This is my code.......... # !/usr/local/bin/perl -w use warnings; # use strict; #use diagnostics -verbose; my $datafile = data.txt ;
    Message 1 of 7 , Apr 30, 2007
    • 0 Attachment
      This is my code..........

      # !/usr/local/bin/perl -w

      use warnings;
      # use strict;
      #use diagnostics -verbose;

      my $datafile = "data.txt";
      open(FILEHANDLE,"$datafile");
      @fdata = <FILEHANDLE>;

      $tsize = (@fdata);
      my $v=0;
      my $u=0;


      for($u=0;$u<=$tsize;$u++)
      {

      if($fdata[$u] != '#')
      {
      $datain[$v] = $fdata[$u];

      $v = $v + 1;

      }
      else
      {
      $u = $u+1;
      }
      }



      When is execute this code , i get following error........
      Argument "72795^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "72850^I232\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "72913^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "72961^I234\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73022^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73082^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73145^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73205^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73274^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73324^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73391^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73442^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73511^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73570^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73633^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73693^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73750^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73814^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73872^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73929^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "73982^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74053^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74107^I232\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74161^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74232^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74286^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74352^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74414^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74471^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74522^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74593^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74646^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74707^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74766^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74830^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74890^I230\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.
      Argument "74942^I231\n" isn't numeric in numeric ne (!=) at pinget1.pl line 206, <FILEHANDLE> line 1466.




      Please help me how to fiugre out this error.......my data file contain is like this.


      12 230
      45 250
      75 250

      and so on.............


      ---------------------------------
      Ahhh...imagining that irresistible "new car" smell?
      Check outnew cars at Yahoo! Autos.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.