in reply to What is the intention and logic of this line in the beginning of the script?

The if 0; is usually done to prevent Perl from running what comes before it, but shells still interpret it.

So what comes before it must parse as valid Perl code, and execute as valid shell code.

The usual use case is to call perl to execute the current script if it was accidentally executed by a shell.

  • Comment on Re: What is the intention and logic of this line in the beginning of the script?
  • Download Code