Uri Guttman wrote:
"JWK" == John W Krahn <jwkr...@shaw.ca> writes:
>>> Can someone point out the importance of the brackets in which '2'
>>> prints, but '1' does not? I've always thought that the brackets could be
>>> omitted:
>>>
>>> print "1" if ref $href =~ /HASH/;
>>> print "2" if ref($href) =~ /HASH/;
>>
>> ... is it because ref() is trying to work like this?:
>>
>> ref ($href =~ /HASH/);
JWK> In a word, yes.
JWK> Perhaps you meant to use the higher precedence operator eq:
i think you mean lower precedence.
Yes, thank you. :-)
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/