in reply to The perils of being tricky

There's a better solution here. Always use warnings, especially use warnings 'void';, which will give you a "useless use of a constant" warning, since your "\n" isn't doing anything...

(OK, looking at the output, this is one of the few cases where you get a useful "'print (' interpreted as function" without getting some other error... but the advice still holds. Use warings, or -w, even on quick one-liner check code, esp when something strange is happening.)


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re^2: The perils of being tricky
by mstone (Deacon) on Jun 04, 2005 at 19:19 UTC

    Looks like you posted while I was writing the reply above. IMO, a syntax error is warning enough. If I can't fix the error without assistance, I'm probably in over my head and should look for a simpler way of doing things.