in reply to Selective Printing of Lines

But the code ignores the condition if ($b[$j] = $b[$j+3])
That's because = does assignment, not comparison.