I am using syntax checking to see whether my Perl script is being used in the correct way. If the syntax is not correct, I display a message saying what the correct syntax is, a
It is best to follow existing practice ("rule of least surprise"): exit with 2 on a fatal error such as a syntax error.