in reply to Re: How do you place words from a sentence into an array?
in thread How do you place words from a sentence into an array?
chomp is not needed here, you can see this through this demo:
use Data::Dumper; use strict; use warnings; $_ = "1 2\n3\t4\r\n5\n"; my @words = split; print Dumper(\@words);
It gives you:
$VAR1 = [ '1', '2', '3', '4', '5' ];
In Section
Seekers of Perl Wisdom