# 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; }
In reply to Re^3: What does 'next if $hash{$elem}++;' mean?
by blazar
in thread What does 'next if $hash{$elem}++;' mean?
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |