How to check the syntax of perl script without execution

Its necesary to check the syntax of perl script before the execution. We can use the below command to verify the syntax of perl scripts.

#perl -c script.pl

Here we need to replace script.pl with thw actual script file name.

 

Leave a Reply

Your email address will not be published. Required fields are marked *