use strict; my $lastline; while () { chomp; unless (/^\Q$lastline\E/) { print $lastline,"\n"; }; $lastline = $_; }; # Assuming that the last line read will always # be relevant print $lastline; __DATA__ CHILD: Topology/IPClassA CHILD: Topology/IPClassA/Device CHILD: Topology/IPClassA/Device/log_ratio CHILD: Topology/IPClassA/Device/poll_interval CHILD: Topology/IPClassA/Device = 2 CHILD: Topology/IPClassA/Device = 2/poll_interval CHILD: Topology/IPClassA/Device = 2/is_managed CHILD: Topology/IPClassA/Device = 2/Port CHILD: Topology/IPClassA/Device = 2/Port/ifPhysAddress CHILD: Topology/IPClassA/Device = 2/Port/poll_interval CHILD: Topology/IPClassC CHILD: Topology/IPClassC/Device CHILD: Topology/IPClassC/Device/poll_interval CHILD: Location #### D:\Downloads>perl -w tmp.pl Use of uninitialized value in quotemeta at tmp.pl line 9, line 1. CHILD: Topology/IPClassA/Device/log_ratio CHILD: Topology/IPClassA/Device/poll_interval CHILD: Topology/IPClassA/Device = 2/poll_interval CHILD: Topology/IPClassA/Device = 2/is_managed CHILD: Topology/IPClassA/Device = 2/Port/ifPhysAddress CHILD: Topology/IPClassA/Device = 2/Port/poll_interval CHILD: Topology/IPClassC/Device/poll_interval CHILD: Location #### CHILD: Topology/IPClassA/Device = 2/Port #### perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web