in reply to Re^2: Nested Hash Dereferencing Syntax
in thread Nested Hash Dereferencing Syntax

It strikes me that curlies (or braces) are used for legacy reasons given that the provenance of the language is the *NIX shell (see, to name but one, Perl).

As we all know, *NIX shell uses braces in references to environment variables - when and only when the variable isn't followed by a printable, non-word boundary char can the braces be omitted e.g. ${foo}_bar is the var foo with _bar appended, whereas $foo_bar refers to a variable named foo_bar.

This (string interpolation) is true for both shell and perl, but interestingly (I really ought to get out more:-) not in make(1) scripts - which can take braces or parens as separators.

Update:

Thanx to tilly for the hint.

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^4: Nested Hash Dereferencing Syntax
by tilly (Archbishop) on Feb 24, 2009 at 18:24 UTC
    I don't understand what you mean by saying that Perl is like shell in this regard unless you are talking about string interpolation.