http://www.perlmonks.org?node_id=928135


in reply to Re^8: XS: returning a 64-bit unsigned int?
in thread XS: returning a 64-bit unsigned int?

Tie is only one kind of magic. Magic scalars are actually quite common.

$1 $| $ENV{PATH} $ISA[0] $tied{$k} $tied[$i] $#a pos substr

(Some of these only return magical scalars in lvalue context.)

Every tied hash and array uses them in order to call STORE on the hash or array when assigning to the scalar returned by $tied{$i} and $tied[$i].