1 2 3 4 5 6 7 8
#!/usr/bin/perl while(<>) { my ($lhs, $f, $e, $s) = split / \|\|\| /; $f =~ s/\[X[0-9]+\]/\[X\]/g; print "$f\t$_"; }