"be consistent" | |
PerlMonks |
Enclosing one-liner in a bigger loop - unixby baxy77bax (Deacon) |
on Apr 24, 2015 at 08:53 UTC ( [id://1124498]=perlquestion: print w/replies, xml ) | Need Help?? |
baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
hi This is probably a well know thing but somehow I missed it. Let say I have the following oneliner: My question is : What would be the simplest way to apply this one-liner to each file in my directory: ls dir | for each file execute: perl -lne '/^([^\t]*)\t/; $hash{$1}++}{print $_ foreach(keys %hash)' thnx
Back to
Seekers of Perl Wisdom
|
|