On Wed, Apr 14, 2004 at 02:18:48PM +0200, Juerd wrote:
I propose to use ` as a simple hash subscriptor, as an alternative to {}
and <<>>. It would only be useable for \w+ keys or perhaps -?\w+. As
with methods, a simple "atomic" (term exists only in perlreftut, afaix,
but I don't know another word to describe a simple scalar variable)
scalar should be usable too.

%hash`key
$hashref`foo`bar`baz`quux %hash`$key
$object.method`key

I absolutely love it. Since hashes are used so much, I think it deserves this short syntax. Note btw that it's not even mutually exclusive with qx's use of backticks. To illustrate that, see:


http://www.math.leidenuniv.nl/~xmath/perl/5.8.3-patches/tick-deref.patch

It's a quick patch I made that adds the `-operator to perl 5.8.3, so you can try it how it "feels".


With some imagination, this can also be used for arrays.

I like that too. (though not (yet) implemented in my patch)



-- Matthijs van Duin -- May the Forth be with you!

Reply via email to