Stuart White wrote:

>
> Yes, that's what I was doing at first.  Then I
> consulted "Beginning Perl," and it told me that I had
> to "stringify" the list to get spaces in between the
> numbers.

Hi Stuart,

Well, it does seem to work that way, but you should do the stringifying only as
you print.  Under most circumstances, you should not enclose variables in
quotes.  Single quotes prevent the variable name from being interpolated at all,
and double quotes do string magic, for good or ill.

The warning you got about concatenation should indicate something to you about
what you are asking for when you double-quote a variable.  Perl interprets the
variable as a single string, then concatenates that string with the substrings
preceding and following it.  They may be empty strings, but Perl will attempt
the concatenation anyway, and choke on any variable that is unitinaialized, and
therefore not interprible as a string.

Joseph



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to