in reply to What's wrong with my syntax?

You might try:
use diagnostics;
for more verbosity in Perl's messages.