3 ms·
edit: this is failing if a line is repeated more than once, see @showdead's excellent explanation the shortest I've got so far is perl -lnE'say if!++$#$_'
by asicsp 7y ago
edit: this is failing if a line is repeated more than once, see @showdead's excellent explanation
the shortest I've got so far is
perl -lnE'say if!++$#$_'
---
I don't understand what's happening with $#$_ but seems like something I should look into, thanks :)
you could remove n as p is used and would be same no. of characters as
perl -ne 'print if $#$_++'
you could save one more by removing space between e switch and single quote