in reply to Re^4: two dice question
in thread two dice question

Ah, but then your dice have leading spaces in front of them. :)

my @dice = map { (my $t = $_) =~ s/^\s+(?=\S)//gm; $t } split( /^--\n/ +m, <<'EOT' ); ... EOT

Replies are listed 'Best First'.
Re^6: two dice question
by ikegami (Patriarch) on Jul 17, 2007 at 17:54 UTC

    The OP had the spaces too, so I presume they're supposed to be there.

    What's the purpose of (?=\S) in your regexp?

      Stupid, unnecessary redundancy since \s+ stops at \S and i wasn't really thinking?