Skip to main content
- Use perl -e 'code' to execute one line of code in perl.
- use strict; is a compiler flag that tells the compiler to change its behavior in certain ways:
- generates a compile-time error if you access a variable without declaration.
- generates a run-time error if you use symbolic references.
- generates a compile-time error if you use a bareword identifier (no quotes on a string).
- use warnings; is used to catch unsafe code. It will disallow certain programming constructs and techniques. It just looks for the most common scripting error and syntax errors.
- use version; to use a specific version of Perl.
- print command in Perl does not add a new line at the end of the string. For this, we have the say command which appends a '\n' at the end of every line.
- You can use q{} in place of '' and qq{} in place of "".
Comments
Post a Comment