in reply to Re: Re (tilly) 2: Whether to use local()
in thread Whether to use local()

Was local on hash/array elements added as a hack for signal handlers?

local was added to perl when there were only global variables as a hack for providing a means of creating "local" variables. There are other uses for it though, but that is better said here: Seven Useful Uses of local

Replies are listed 'Best First'.
Re: Re: Re: Re (tilly) 2: Whether to use local()
by shotgunefx (Parson) on Mar 17, 2002 at 08:22 UTC
    I guess what I find odd about it working on pieces of arrays and hashes is why bother? I mean if it can do a chunk of a lexical hash, why not a whole hash? I can't imagine why the half implementation. I'm sure there was a good reason, but I can't imagine what it is.

    -Lee

    "To be civilized is to deny one's nature."