Table of Content
Perl is specially designed for processing text. It stands for Practical Extraction and Report Language. It is developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming and GUI development.
Q Is Perl Compiled or Interpreted
It is interpreted, which means that your code can be run as is, without a compilation stage that creates an executable program.Traditional compilers convert programs into machine language. When you run a Perl program, it’s first compiled into a bytecode, which is then converted (as the program runs) into machine instructions. There is no need to have a main() function or anything of that kind. Perl statements end in a semi-colon: print “Hello, world”;
Double Quote and Single Quote
double quotes “interpolate” variables and special characters such as newlines (\n ):
- print ‘Hello, $name\n’; # This will print $name\n
- literallyprint “Hello, $name\n”; # This works fine
Perl File Extension: A PERL file must be saved with a (.PL) file extension in order to be recognized as a functioning PERL script.
Perl Data Types
Perl has three built in variable types:
- Scalar – represents a single value
- Array – represents a list of values:
- Hash – represents a set of key/value pairs
Few hands Picked Articles for you