in reply to How can I store a scalar variable, coming out of a do-until loop, as an element in an array for further operations?
I think it might help if you replace
@all_sentences=(my $sentence); [download]
with
push @all_sentences, $sentence; [download]