> Quick question: > > When exactly are {} braces required? I notice when following > references, $ { $var } and $$var both work identically. Do you ever > actually need them? > > - B
1) You need them to enclose hash keys $hash{key} 2) The rest is just like ( and ) in math. If the precedence is the way you need it you don't need them, if you need to change the order you do ... and you'd sometimes better use them even if you do not have to. Just to make it easier to understand. As an example of a case you need them : $x = 'Hello World'; %hash = ( key => \$x); # and print $$hash{key}; # vs. print ${$hash{key}}; Here without the additional curlies you do not access hash %hash, but rather a hash reference $hash. Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]