Friday, September 27, 2013

syntax error at line 10, near "$h ("

Perl language have bit different mechanism when dealing with errors. Some points you should know before debugging errors.

1)Always use shebang statement with  -w option as shown below.
#!/usr/bin/perl -w
2)Always use strict and warnings package to report all syntax errors.
use strict;
use warnings;

When you get above error do not just check error on the given line try to check before and after the line of error report. This tip will resolve most of your errors like missing closing brace "}", sentence termination like ";", etc.


Post a Comment