Help for this page
my $last; my $i = 0; ... $last = $_; print OUT ("$_ $i\n"); }
perl -lpe "$i++ if ($_ ne $last); $last = $_; $_.=' '.$i;" inputfile > + outputfile