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

Yes, but for unrelated reasons.
@$ is not a valid name for a lexical.
our @$ = 1..4; would not give an error.
By your logic, splice(@Foo::bar, 0, 1) should give an error because my @Foo::bar = 1..4; gives an error.

Replies are listed 'Best First'.
Re^4: Is this a bug in splice?
by Limbic~Region (Chancellor) on Feb 20, 2008 at 13:26 UTC
    ikegami,
    No. That's not what I meant at all and I admit that my argument was not complete. What I am saying is that you are not forced to declare @$ with my nor our because it starts with a punctuation character. If I had declared it with my, I would have realized my typo because I would have gotten an error. If I had declared it with our, I would have meant to create a global variable.

    In other words, I understand that this is documented behavior but I don't like it. In a nutshell, if you make typos with variables starting with punctuation characters - you are on your own because they will silently spring into existance. I do really appreciate your response though because I was not parsing it the same way as perl which made even less sense :-)

    Cheers - L~R