http://qs321.pair.com?node_id=603363


in reply to Read file line by line and check equal lines

I thought I would tempt you with this version.
#!/usr/bin/perl use strict; use warnings; my $previous; &unique while(<DATA>); sub unique { return if $previous and $previous eq $_; print; $previous = $_; } __DATA__ a1a a1a b1b c1c c1c d1d d1d e1e f1f g1g g1g h1h h1h i1i j1j k1k k1k k1k

-=( Graq )=-