in reply to writing blank array to file?
Anyway, why bother adding the numbers to the array if they're sequential? Arrays already have sequential behavior. You can display an array with index numbers (assuming your array members have newlines) using:
my $num = 1; print map { $num++, " $_" } @myArray;
And you can delete a given index using:
foreach my $i (0..$#chunk) { print TO_WRITE $chunk[$i] unless $i == $number; }
|
|---|