in reply to parse multiple text files keep unique lines only
#!/usr/bin/perl # http://perlmonks.org/?node_id=1193719 use strict; use warnings; use File::Find; use File::Slurp qw( edit_file_lines ); my $directory = 'some/test/'; find sub { my %u; -f and /\.txt$/ and edit_file_lines sub { $_ x= !$u{$_}++ }, $_ }, $directory;
hehehe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parse multiple text files keep unique lines only
by 1nickt (Canon) on Jun 28, 2017 at 08:02 UTC | |
by tybalt89 (Monsignor) on Jun 28, 2017 at 13:05 UTC | |
by tybalt89 (Monsignor) on Jul 01, 2017 at 02:53 UTC |