On Wed, 2004-09-01 at 14:35, Uri Guttman wrote:
> the symbol table is just a special hash tree with
> global side effects. so why not just use a regular hash as it is safer
> (no global side issues), more flexible (you can pass it around, take
> references, create anonymous hashes) and you can create lexical hashes.

Pass it around:

        perl -le 'sub foo{print ${$_[0]{x}}}$x=1;foo(\%::)'

Take references: see above

Create anonymous hashes: hmmm I've never tried that.... hmmm....

        $anon_stash = \%{"__anon_stash__::"};
        delete $::{"__anon_stash__::"};
        # Now $anon_stash is truly anonymous

Oh, and yes, I agree that that's just wrong ;-)

-- 
â 781-324-3772
â [EMAIL PROTECTED]
â http://www.ajs.com/~ajs

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to