[Malvern] OT - Perl Query
Stuart Bird
e_tective at yahoo.co.uk
Sun Sep 16 09:07:50 BST 2007
Hi All
Can anyone help me amend this perl one liner to write the duplicates to
"combined.txt" rather than strip out the duplicates and print whats left
(I think that makes sense :)
'$count=0; while (<>) {if (! ($var{$_}++)) {print $_; $count++;}} warn
"\n\nRead $. lines.\nTook union and removed duplicates, yielding $count
lines.\n"'>./data.>/data1.txt > ./combined.txt
Many Thanks
Stu Bird
More information about the Malvern
mailing list