my $first_half = join(' ', @words[0 .. $midpoint]); my $second_half = join(' ', @words[$midpoint + 1 .. $#words ]);