http://www.perlmonks.org?node_id=841608

vis1982 has asked for the wisdom of the Perl Monks concerning the following question:

file

ass ass

array

rat rasa

arrow ant

sad

question is if a file has both partners then we can print and leave out those lines which has one partner

So code is
# !usr|bin|perl -w open(FILE1,"$ARGV[0]"); @array1=<FILE1>; close(FILE1); foreach (@array1) { # next if ($_=~/(\s+$)/); my @t =split ("\s",$_); if ($t[0]=~/(\w*\d*)/) #(\s*)(\w*\d*)/){ { if ($t[1]=~/(\w*\d*)/) { #{ next if ($t[1]=~/(^\s+$)/); } print "$1 \n"; } } exit();
But it is not giving output