in reply to Re: output unique lines only
in thread output unique lines only
It currently only outputs one line. For example, if my file contains#!/usr/bin/perl -w $filelist = "/home/exp/acctlist.txt"; open(FILEDUPS, $filelist) || die ("Cannot open $filelist"); open($output, '>', '/home/exp/output.txt') || die ("Cannot open file"); while ($line = <FILEDUPS>) { chomp $line; ($filename, undef, undef, undef, undef) = split /\t/, $line; } $uniquefiles{$filename} = 1; foreach $k (keys %uniquefiles) { print $output "$k\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: output unique lines only
by kulls (Hermit) on Dec 07, 2005 at 04:11 UTC |