in reply to Re^4: how to change this code into perl
in thread how to change this code into perl

#!perl use strict; use warnings; my $infile = $ARGV[0]; my $outfile = $ARGV[1]; open IN,'<',$infile or die "Could not open $infile : $!"; my %count = (); my @lines = (); while (<IN>){ push @lines,$_; if (/^(\S+)/){ ++$count{$1}; } } close IN; open OUT,'>',$outfile or die "Could not open $outfile : $!"; for (@lines){ if (/^(\S+)/){ print OUT $_ if $count{$1} > 1; } } close OUT;
poj