On May 29, 2014, at 3:34 PM, Sherman Willden wrote:

> Maybe I'm missing the point but isn't the following code the problem's 
> answer? Please let me know if I am off base.

Just a bit off (see below).

> #!/usr/bin/perl
> 
> my @test = "a b c";

That is a scalar on the right-hand side. You end up with a one-element array in 
which the first and only element is the string 'a b c'. Shawn and I were using 
the qw() operator, which splits a string on whitespace and returns a list:

  my @test = qw(a b c);

which is equivalent to and shorter than:

  my @test = ( 'a', 'b', 'c');



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to