It does not appear to be doing what I ask of it.my $new_outputfile = $outputfile."_B"; open (RESULT_FILE, "<$outputfile"); open (CLEANED_RESULT, "+>$new_outputfile"); our @data = <RESULT_FILE>; chomp @data; my %seen; for ( @data) { next if $seen{$_}++; print CLEANED_RESULT "$_\n"; } remove $outputfile or warn $!; rename "$new_outputfile", "$outputfile" or warn $!;
In reply to Is this code logical? by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |