Help for this page

Select Code to Download


  1. or download this
    while (1) {
       ...
    }
    
  2. or download this
    my @a;
    while (my $val = <>) {
       chomp $val;
       push @a, $_ if !grep $_ eq $val, @a;
    }
    
  3. or download this
    my @a;
    my %seen;
    ...
       next if $seen{$_}++;
       push @a, $_;
    }