in reply to Re^2: Is this a bug in splice?
in thread Is this a bug in splice?

Take a look at the error you get. Perl knows that @$ is not a valid name for a lexical variable. So it won't let you declare it with my. But it is a valid global variable name, and Perl recognizes it as such.

Try declaring it with our. Also see my update to my original response.

Edit: I said $@ and meant @$. Thanks ysth.

Replies are listed 'Best First'.
Re^4: Is this a bug in splice?
by Limbic~Region (Chancellor) on Feb 20, 2008 at 03:35 UTC
    tilly,
    I understand that and that this is documented behavior. I still don't like it.

    Perhaps it is because it is the first time I can remember getting bit by it. In a nutshell, perl is telling you that if you want to use a variable that starts with a punctuation character - you are on your own (no warnings/errors) so don't make a mistake.

    Cheers - L~R