Help for this page

Select Code to Download


  1. or download this
    while(<FILE>){
      chomp;
      push @data, split(/,/,$_);
    }
    
  2. or download this
    my @data = ();
    while(<FILE>){
      chomp;
      push @data, [ split(/,/,$_) ];
    }
    
  3. or download this
    print data[0][0]; # prints the first element of the first line
    print data[4][3]; # prints the fifth element of the fourth line