RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/Perl-6/create-a-two-dimensional-array-at-runtime-1.pl6

5 lines
149 B
Raku
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
my ($major,$minor) = prompt("Dimensions? ").comb(/\d+/);
2015-02-20 00:35:01 -05:00
my @array = [ '@' xx $minor ] xx $major;
@array[ *.rand ][ *.rand ] = ' ';
2013-04-10 22:43:41 -07:00
.say for @array;