in reply to Re^3: parse multiple text files keep unique lines only
in thread parse multiple text files keep unique lines only
With Path::Tiny, you don't need File::Find.
#!/usr/bin/perl # http://perlmonks.org/?node_id=1193719 use strict; use warnings; use Path::Tiny; my $directory = 'some/test/'; path($directory)->visit ( sub { my %u; -f and /\.txt$/ and $_->edit_lines ( sub { $_ x= !$u{$_}++ } ) } );
|
|---|