Help for this page

Select Code to Download


  1. or download this
    $ perl -wle'
        my %neg = ( o => "i", i => "o" );
    ...
    iiiiMMMMoooo
    iiiiMMMMoooo
    ooooMMMMiiii
    
  2. or download this
    $ perl -wle'
        my %neg = ( o => "i", i => "o" );
    ...
    iiiiMMMMoooo
    iiiiMMMMoooo
    ooooMMMMiiii
    
  3. or download this
    perl -ple'
        BEGIN { %neg = qw( i o o i ) }
        s/([io])M*\K(\.+)/   $neg{$1} x length($2) /eg;
        s/(\.+)(?=M*([io]))/ $neg{$2} x length($1) /eg;
    '