Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    foreach my $foo (@fields) {
      print "$foo->[2]\n" if ($foo->[2] != 3);
    }
    
  2. or download this
      push @Array , [ @Fields[0,3,6] ];
    }
    ...
    foreach my $foo (@fields) {
      print "$foo->[2]\n" if ($foo->[2] != 3);
    }
    
  3. or download this
    while (<FILE>) {
      next if (/^#/);
    ...
      chomp $Fields[6];
      push @Array , [ @Fields[0,3,6] ];
    }
    
  4. or download this
    chomp @Array;