in reply to Re: Six uses for curlies?
in thread Six uses for curlies?

I just saw that comments at the end of the article also mention variable name disambiguiation (eg "${foo}_bar"), didn't think of that one.

So if we count the regex uses that's 7, and if we don't it's only 5 (seems there's no reason to count the quoting uses, since pretty much anything can be used there).

Replies are listed 'Best First'.
Re^3: Six uses for curlies?
by davido (Cardinal) on Jan 13, 2006 at 05:31 UTC

    Actually, more than seven if you count the uses within regexen: (?{...}), and (??{...}) are two different types of extended patterns, plus quantification, though you could argue that the curlies function as code blocks within the extended regex patterns, though that's a difficult distinction. Disambiguation!, I knew I missed a good one.


    Dave

      I think that's cheating. Since those are just another example of {} delimiting code, I'd class those with the block category.