in reply to can't use global @_in "my"

I can't count how many times I've been hit by this. The fact that line 227 is a closing curly bracket usually almost always indicates that you have problem with parentheses/bracket matching. Check before line 202 upward, since line 202 is fine.

One way I use to find the exact line of error is by consequetively putting die "OK" line between lines or blocks of code.


Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^2: can't use global @_in "my"
by ikegami (Patriarch) on Aug 01, 2007 at 14:16 UTC
    I fail to see how adding die statements would help find a *compile* error. BEGIN { die } might help, but for this type of problem, I usually remove entire chunks from the file until perl -c doesn't find the error. The last thing removed contains the error. Re-add smaller bits until the error comes back if the chunk was too big.
      You are right, ikegami. My second paragraph has nothing to do with the original problem. It's the technical I use for runtime error. Thanks for reminding me :-)

      Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!