in reply to Re^2: What does 'next if $hash{$elem}++;' mean?
in thread What does 'next if $hash{$elem}++;' mean?

# Simple enough?!? sub remove_duplicate_lines { my ($infile, $outfile)=@_; open my $in, '<', $infile or die "$infile: $!\n"; open my $out, '>', $outfile or die "$outfile: $!\n"; my $oldout=select $out; my %saw; $saw{$_}++ or print while <$in>; select $oldout; }