LPM: Silly string question
Frank Price
fprice at mis.net
Sat Dec 11 10:39:00 CST 1999
On Fri, 10 Dec 1999, Joe Hourcle wrote:
# On Fri, 10 Dec 1999, Steve Lane wrote:
#
# > i'm tempted to try to explain the general rule here
# > (something like "braces following a variable identifier
# > character mean treat what's inside the braces as either
# > a reference or a variable name"), but i'm not exactly
# > sure if that's exactly correct. anyway, it works.
#
# >From my understanding of it, you're basically just specifying braces, as
# they're generally implied to be from the identifier ($@%*&), to the
# wherever it could be (greedy matching)
#
# Braces are also useful for setting wierd precidence, as I think the
# following should all give the contents of $width:
#
# $width
#
# ${width}
#
# $foo = 'width'; ${$foo}
#
# ${&foo}; sub foo { return 'width'; }
These last two will only work if you don't have 'use strict' turned on,
or haven't selectively turned it off for symbolic references with "no
strict 'refs'".
-Frank.
____ ____
Frank Price fprice at mis.net
Linux: the choice of a GNU generation -|- Why not go mad?
More information about the Lexington-pm
mailing list