welcome to the video tutorial on Perl
programming Perl is a programming
language specially designed for text
editing it is now widely used for a
variety of purposes including Linux
system administration network
programming web development etc well is
of great importance in a Linux operating
system where it can be used to create
programs handle databases and emails
graphical user interface development and
networking and system administration
even though shell scripting is available
to programmers they prefer pearl because
programming on Perl doesn't cause
portability issues which is common when
using different shells in shell
scripting error handling is very easy on
Perl you can write long and complex
programs on Perl easily due to its
vastness messes and contrast with shell
that does not support namespaces modules
objects inheritance etc shell has fewer
reusable libraries available nothing
compared to pearls cpad shell is less
secure it calls external functions for
example commands like MV or CP on the
contrary holders useful work while using
internal functions let's learn how to
create a Perl script you should always
start your script with sabacc user
bell-curve it directs the execution the
Perl interpreter on your system now
let's learn how to add a variable and
input or output it on Perl
so if you want to define a variable
value you need to use the syntax
variable is equal to value and this way
you can store the values to a variable
in form of strength and number when it
comes to displaying a string or value on
the screen you need to use the Print
command which would output the string of
value and if you want to assign input to
a variable in
you need to use the STD eye and operator
so the syntaxes variable is equal to as
ddim now let us go through some
important points add a comment on Perth
with the hash symbol remember that every
statement in Perl ends with a semicolon
a Perl is case sensitive make sure you
use the right case you can use any text
editor to write your perl scripts it
should then save the script file and dot
p an extension which will make it
recognizable make sure you do not use
faces when you are naming the Perl
script file now let us understand the
steps in creating a Perl script create a
file using VI or any other text editor
named skip file with extension dot PL
start the script with the shebang sign
followed by user bin perl path write
some code save the script file as file
name dot VLE
for is accusing the script type bash
space filename dot VL let's write a Perl
script which will take input from the
user and display it back through the
script so let us go ahead and create a
new post script file on VI editor as
discussed earlier you need to start your
script with the shebang sign followed by
user then perl path
[Music]
once done hit enter and write the script
that you want to execute now here is the
script that we want to run
[Music]
now as we are done writing the script
and has go ahead and save it now is the
time to run the script for running the
script you need to type in Perl followed
by the script name once he will be Enter
key
the file would ask you for an input so
it says we are take your name please let
us write our name guru nine nine
once you hit enter the file returns the
input value by displaying our name so
this is how you can create Perl scripts
let us quickly recap what we learned in
this tutorial Perl is a general-purpose
programming language originally
developed for text manipulation now it
is used for a wide range of tasks
including system administration web
development network programming GUI
development and more whole files have
dot PL extension there are three types
of variables in Perl scalar lists and
hashes thank you for watching this
tutorial I would see you in the next one