Help for this page

Select Code to Download


  1. or download this
    my %combined;
    open(my $input, "<", "flatfile.dat") or die ("Unable to open file");
    my $line = <$input>;
    ...
            push( @{ $combined{$header} }, shift(@row) );
        }
    }
    
  2. or download this
    #Remove duplicates
    my %seen = ();
    my @uniqueOutput = grep { ! $seen{ $_ }++ } @output;
    print $fh3 @uniqueOutput;