Angel Faus skribis 2004-04-19 22:43 (+0200): > If we really need a ultra-huffman encoding for hash subscriptors, I > have always dreamt of being able to do: > %hash/key > $hashref/foo/bar/baz/quux > ...
I'd hate to give up dividing slash. It's one of the few operators that I sometimes type without whitespace. Simple because 1/10 is good enough and 1 / 10 is very wide. Other than that, I like it. But it isn't really doable. > %hash/{ some_func() } # dynamic key > %hash/«key1 key2» # hash slice > %hash/['key', 'key2'] # the same I think this is not a good idea. > * «a b» and ['a', 'b'] are always substitutable, ever Only because they are here, doesn't mean they are everywhere. > A xml library could make every node a tied hash, effectively embedding > a good portion of xpath within perl Hmm... If only the slash weren't used by something extremely important. > for /home/angel -> $file { That would mean giving up // for regexes (i.e. making the m mandatory). And I think having quotes for strings other than very simple ones (anything containing a / is not a simple string imho) is good for readability. Juerd