Help for this page

Select Code to Download


  1. or download this
    if ( $seen{ $elem } ) {
        next; # skip to the next loop iteration
    ...
    else {
        $seen{ $elem } += 1;
    }
    
  2. or download this
    use strict;
    use warnings;
    ...
    }
    
    close $IN; close $OUT;
    
  3. or download this
    while (<$IN>) { $seen{$_}++ || print $OUT $_ }