in reply to How to add each line into single line in txt file PERL?
Hi Hellena,
I'm a bit guessing what you want to achieve. I assume you have the problem that Dump($post) is printed more than once in case there is more than one unique line in both files. You can evade this by leaving the loop once you printed the first time. That could be done the following way, using last:
HTH, Rataforeach my $line(keys %results){ if ($results{$line} == 1) { print Dump($post) ; last; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to add each line into single line in txt file PERL?
by Hellena (Initiate) on Feb 19, 2013 at 13:48 UTC |
In Section
Seekers of Perl Wisdom