How can I generate an array in Perl with 100 random values, without using a loop?
I have to avoid all kind of loops, like \"for\", foreach\", while. This is my exerc
Recursion:
#!/usr/bin/perl use warnings; use strict; my @rands; my $i=1; sub push_rand { return if $#rands>=99; push @rands, rand; push_rand(); } push_rand(); for (@rands) { print "$i: $_\n"; $i++; }