I want to initialize 4^9 (=262144) indices of @clump as 0. So I wrote this:
my $k=9;
my @clump=();
my $n=4**$k;
for(my $i=0;$i<$n;$i++){
push(@clump,0);
print "$i ";
}
But it keeps freezing at 261632! I then tried making $n=5^9 (=1953125) and my code stopped at 1952392. So its definitely not a memory issue. This should be simple enough but I can't figure out what's wrong with my code. Help a newbie?
perl -E '$k=9; @clump=(); $n=4**$k; for($i=0;$i<$n;$i++){ push(@clump,0)}'@clump = (0) x 4 ** $kwork for you?