> 
> The only difference is the lack of parentheses around my 
> $word on the 4th line.  I read that this has something to do 
> with scalar context, but I don't see why one would be scalar 
> context and not the other.  They both look like scalars to me.

You pretty much answered your own question :-). The first is the an array
context and you are telling it to match a chunk of the expression on the
right and place it in the var. 

the second one in a scalar context, ask the question "does the expr on th
right match", answer is yes, to put 1 in $word.

check this doc on scoping:
http://perl.plover.com/FAQs/Namespaces.html

 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to