#!/usr/bin/perl # http://perlmonks.org/?node_id=1193292 use strict; use warnings; while() { my $n = 1; s/(?