use Perl6::Form; my $eulogy = <qr/\s+/}, "| {[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[} |", $eulogy, "",""; # Squeeze all whitespace except newlines... print form {ws=>qr/[^\S\n]+/}, "| {[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[} |", $eulogy, "",""; # Squeeze even harder before punctuation print form {ws=>qr/[^\S\n]+ ([,.!])?/x}, "| {[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[} |", $eulogy, "",""; # Form is smart enough not to squeeze zero-width matches... print form {ws=>qr/\s*/}, "| {[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[} |", $eulogy, "","";