On 1/22/07, <b class="gmail_sendername"><a href="mailto:firstname.lastname@example.org">email@example.com</a></b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It works well.<br>One question though: am I correct in assumming "q" is scalar and "qw" is<br>array?</blockquote><div><br>I hesitate to say yes, since the terms "scalar" and "array" are usually used to denote the context of an expression, and that is something being imposed from outside of the expression itself.
<br><br>Or, said another way, you could use either one in either context, although "qw" is pretty useless in scalar context. "q" is the same as a single quotation mark, just using a (probably) different character to delimit the string, so it can be used in either context. But it will always produce just a single (scalar) value.
<br><br>But if you don't want to dive into it that far, then the answer is yes. "q" produces a scalar; "qw" produces a list.<br><br> q/a b c/ is the same as q[a b c] is the same as 'a b c'
<br> qq/a b c/ is the same as qq[a b c] is the same as "a b c"<br>
qw/a b c/ is the same as ('a', 'b', 'c') is the same as split(/\s+/, "a b c")<br><br></div></div>