in reply to tie and magic

ie some variable as SCALAR, HASH and ARRAY simultaneously
This isn't possible, even using XS and perlguts. The perl lexer sees these as three separate variables:
$x # lexer returns $x $x[0] # lexer returns @x ... $x{0} # lexer returns %x ...
of course, you could tie all three variables, but that's probably not what you want.

Dave.

Replies are listed 'Best First'.
Re^2: tie and magic
by pajout (Curate) on Sep 21, 2005 at 13:03 UTC
    O.K., thanks, and what about $x, $x->[0] and $x->{str} ? I will read Object::MultiType, to use it or to steal some ideas.
      what about $x, $x->[0] and $x->{str}
      Yes, that should work. Object::MultiType works by overloading object refs.

      Dave.