Hi Anonymous Monk, I have had quite a thought about it and I think the thing I would most likely do is to first reduce complexity by removing all duplicated lines with the same integer infront of them. Is this right. I tried running the script below and then ran the script above -jgg.pl. But the result are not good. Any ideas or suggestions how I could marry the two in a sensible fashion
my $file = 'my_data_file.txt'; my %seen = (); { local @ARGV = ($file); #local $^I = '2.txt'; while(<>){ $seen{$_}++; next if $seen{$_} > 1; print; } }
In reply to Re^2: Count similar characters in a row - only once
by $new_guy
in thread Count similar characters in a row - only once
by $new_guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |