fork download
  1. #!/usr/bin/env perl -nl
  2. use v5.10;
  3. say map$&=~/$_/i?O:".",a..g while/\(\w+\)|./g
Success #stdin #stdout 0s 17496KB
stdin
CDAG.DAG
B(ACE)D
GGABC
A..F.C(DA).
.(ABCDEF)
stdout
..O....
...O...
O......
......O
.......
...O...
O......
......O
.O.....
O.O.O..
...O...
......O
......O
O......
.O.....
..O....
O......
.......
.......
.....O.
.......
..O....
O..O...
.......
.......
OOOOOO.