or download this
s/^(?!\|)/|/; # Make sure each line starts w/ |
s/(?<!\|)\|?\n/||\n/; # Make sure each line ends w/ ||
s/\|\|(?!$)/| |/g; # Insert space between || if not at the end of a
+ line
s/^[\s\|]*\n//; # Delete rows w/o meaningful characters