"share" will traverse up references exactly one level. "share(\$a)" is equivalent to "share($a)", while "share(\\$a)" is not. This means that you must create nested shared data structures by first creating individual shared leaf notes, then adding them to a shared hash or array.