Lipscomb, Al writes:
: ------_=_NextPart_001_01C0D71B.8F67C8EA
: Content-Type: text/plain;
: charset="iso-8859-1"
:
:
: >
: > $$STDIN # Return one element regardless of context.
: > @$STDIN # Return number of element wanted by context.
: > *$STDIN # Return all element regardless of context.
: >
:
: How about
:
:
: $STDIN.$ # Return one element regardless of context.
: $STDIN.@ # Return number of element wanted by context.
: $STDIN.* # Return all element regardless of context.
Well, those would be the same thing according to the identity:
word $obj
$obj.word
if you consider '$', '@', and '*' as words. There's some destructive
interference with the Perl 5 dereferencing meaning, which probably
means that casts can't simply be funny characters when there's a $ on
the inside. That's why I was looking at $: and $< variants. But
there's also the $() and @() variants, which we've already said will do
interpolation of scalar and list expressions in strings. So $($foo)
probably means a cast rather than a dereference like ${$foo} (note
curlies). I suppose it's fair to ask whether $$foo ought to mean the
first rather than the second, but that's definitely going again history
to make it a cast.
Larry