in reply to Re^7: What would you change?
in thread What would you change?

Good point and (probably) a good call, but I'm now wondering about the difference betweem the error message you got and that I got: Can't modify non-lvalue subroutine call ...?

I'll have to see if I can reproduce the situation. I was running my REPL at the time.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^9: What would you change?
by ikegami (Patriarch) on May 20, 2008 at 06:31 UTC
    The difference is that I didn't use it as an lvalue. Perl checks whether or not it can be used as an lvalue before trying to execute it.
    >perl -e"&vec()" Undefined subroutine &main::vec called at -e line 1. >perl -e"&vec() = 1" Can't modify non-lvalue subroutine call at -e line 1.