B
Brian
Shouldn't -
my @a;
my $y = 1;
push (@a, $y);
foreach my $x (0..$#a) {
print "array = @a\n";
$y++;
push (@a, $y);
}
result in an endless loop? And if not (I can't get it to) how do I
create an endless loop like that above?
I want to parse through an array, but change the size of the array at
the same time. Don't worry, actual program will have checks and
balances so it does not run till the end of time.
my @a;
my $y = 1;
push (@a, $y);
foreach my $x (0..$#a) {
print "array = @a\n";
$y++;
push (@a, $y);
}
result in an endless loop? And if not (I can't get it to) how do I
create an endless loop like that above?
I want to parse through an array, but change the size of the array at
the same time. Don't worry, actual program will have checks and
balances so it does not run till the end of time.