Perl literals are a value that is represented as is. The value is considered hard coded in the program. Perl supports literals.
Numeric literals represend numbers. Strings literals used to identify names, text, or messages that are displayed in the program. String literals are usually enclosed in single quotes which means that any variables declared in them are not interpolated. Double quoted string literals are also supported, these double quoted string literals do support variable interpolation. Meaning that the variable can be substituted for its real value. Single backquoted string literals are also supported, these normally allow you to run command line options and return the output to your program.
Perl also supports comments in your code. A perl comment is interpreted by a'#' sign. When you see a # sign, it means that everything after that is a comment upto the end of the line.
![]() |
![]() |
![]() |