#!/usr/bin/perl use strict; use warnings; $/ = "\n["; while (<>) {    next unless /is Changed to/;    chomp;    s/\s*\n\s*/; /g;    s/^\[?/[/;    print $_, "\n"; }