SlideShare a Scribd company logo
1 of 20
Download to read offline
Scripting Languages
Dr. Dilshad Ansari,
Dept of CSE,
CMR College of Engineering & Technology
Email :- m.dilshadcse@cmrcet.org
Mob: +91-9816387077
Unit III
Introduction to PERL and Scripting Scripts and Programs,
Origin of Scripting, Scripting Today, Characteristics of
Scripting Languages, Uses for Scripting Languages, Web
Scripting, and the universe of Scripting Languages. PERL-
Names and Values, Variables, Scalar Expressions, Control
Structures, arrays, list, hashes, strings, pattern and regular
expressions, subroutines
Programming Scripting
 Programming languages are compiled to
machine code and run on the hardware
of the underlying Operating system. One
must use a certain IDE (Integrated
Development Environment) to make use
of programming languages. The
programmer provides a set of
instructions for a computer to achieve a
certain goal. Certain algorithms can also
be implemented by writing programs.
 Scripting languages have evolved to
become powerful. Now they are not
limited to create small scripts to
automate operations on a software
system. One can also build a rich
application with scripting languages. It
can manipulate, customize and automate
the facilities of an existing system. Useful
functionality is already available via an
interface; scripting languages provide a
mechanism for exposing functionality to
program control.
Scripts and Programs
1. Script is interpreted by Interpreter
2. Scripts can control another business
applications
Example
 PHP controls web server
 Java Script controls web browser
 VB controls MS office application
3. Script can not executed as stand-alone
Ex. Ruby, Python, R, Perl, Java script,
PHP,VB,TCL etc..
Applications:
1.To automate certain tasks in a program
2. Extracting information from a data set
3. Less code as compared to traditional
programming languages
1. Program is compiled by compiler
2. Program executed independently without
the influence of another application
Example
C, C++,JAVA, C#, etc.
Applications:
1.They typically run inside a parent program
like scripts
2. More compatible while integrating code
with mathematical models
3. Languages like JAVA can be compiled and
then used on any platform.
Origins of Scripting
 Basically the use of the word ‘script’ in an
UNIX operating system create the term ‘shell
script’ for sequence of commands that were
to be read from a file and follow in sequence
as if they had been typed in at the keyword.
 The name ‘script ‘ being used for a text file
that was intended to be executed directly
rather than being compiled to a different
form of file prior to execution.
 Other early occurrences of the term ‘script’ can
be found. For example, in a DOS-based system,
use of a dial-up connection to a remote system
required a communication package that used
proprietary language to write scripts to
automate the sequence of operations required
to establish a connection to a remote system.
 Note that if we regard a scripts as a sequence of
commands to control an application or a
device, a configuration file such as a UNIX
‘make file’ could be regard as a script.
 However, scripts only become interesting when
they have the added value that comes from
using programming concepts such as loops and
branches
scripting languages?
 A scripting language is a programming
language that executes tasks within a special
run-time environment by an interpreter
instead of a compiler. They are usually short,
fast, and interpreted from source code or
bytecode.
 Using a scripting language is preferable
depending on your goals and environment. As
they are a series of commands executed with no
need for a compiler, they are cross-platform and
do not require special software to be installed in
order to run — except for a web browser, of
course.
Types of scripting languages
There are two main types: server-side and
client-side. They differ on where the code is
run from, which affects not only the actual
languages chosen but also the performance
and their capabilities.
1. Server-side scripting language
2. Client-side scripting language
Types of S L
 Server-side scripting language:-
 The term server-side scripting language refers to those that run off a web
server. Since it performs from the back-end side, the script is not visible
to the visitor. Because of that, it is a more secure approach.
 They are often used to create dynamic websites and platforms, handle
user queries, and generate and provide data and others. A famous
example of server-side scripting is the use of PHP inWordPress.
 Examples: PHP, Python, Node.js, Perl, and Ruby.
Types of S L
Client-side scripting language:
 Unlike the above, client-side scripting languages run off the user’s
browser. It is usually performed at the front-end, which makes it visible
to visitors and makes it less vulnerable to exploits and leaks. As such, it is
often used to build user interfaces and lighter functionality such as that.
 Since it runs locally, they usually provide better performance and,
therefore, do not strain your server.
 Examples: HTML, CSS, jQuery, and JavaScript.
Scripting Today
 Scripting allows application to be developed much faster than
traditional methods.
 Use to manipulate, customize, automate the existing system
 EXAMPLE. Use of client side scripting and Making dynamic HTML for
interactive and feature rich enhanced web pages
 UNIX OS used shell script for system management for administration
aspect
 Apache web server has an embedded PERL interpreter for CGI scripts
Scripting Today contd..
Characteristics of Scripting Languages
 Integrated Compile and Run:
 SL are characterized as interpreted
languages.
 SL operate on an immediate execution
basis, without the need to issue separate
commands to compile the program and
then to run the resulting object file, and
without the need to link extensive
libraries into the object code.
 Low overhead and ease of use:
 Less no.of data types
 Less no. of data structures
 Enhanced Functionality:
 provide string manipulation based on the
use of regular expressions, while other
languages provide easy access to low-level
operating system facilities or to the API,
or object exported by an application
 Efficiency is not an issue:
 Abstraction:
 Information hiding, to spare users the
details of internal variable types, data
storage, and memory management.
Web Scripting
 Web is the most fertile areas for the application of scripting languages.
 Web scripting divides into three areas
a. processing forms
b. creating pages with enhanced visual effects and user interaction
c. generating pages ’on the fly’ from material held in database.
Web Scripting Contd..
Processing Web forms: In the original implementation of the web ,
when the form is submitted for processing, the information entered
by the user is encoded and sent to the server for processing by a CGI
script that generates an HTML page to be sent back to the Web
browser. This processing requires string manipulation to construct the
HTML page that constitutes the replay, and may also require system
access , to run other processes and to establish network connections.
Perl is also a language that uses CGI scripting. Alternatively for
processing the form with script running on the server it possible to do
some client –side processing within the browser to validate form data
before sending it to the server by using JavaScript,VBScript etc.
Dynamic Web pages: ‘Dynamic HTML’ makes every component of
a Web page (headings, anchors, tables etc.) a scriptable object. This
makes it possible to provide simple interaction with the user using
scripts written in JavaScript/Jscript or VBScript, which are
interpreted by the browser. Microsoft’s ActiveX technology allows the
creation of pages with more elaborate user interaction by using
embedded visual objects called ActiveX controls. These controls are
scriptable objects, and can in fact be scripted in a variety languages.
This can be scripted by using Perl scripting engine.
 Dynamically generated HTML:
Another form of dynamic Web page is
one in which some or all of the HTML
is generated by scripts executed on the
server. A common application of the
technique is to construct pages whose
content is retrieved from a database.
For example, Microsoft’s IIS web
server implements Active Server Pages
(ASP), which incorporate scripts in
Jscript orVBScript
Uses of Scripting Languages
 A scripting language is a programming language designed for integrating and
communicating with other programming languages.
 The scripting language is basically a language where instructions are written for a
run time environment.
 They do not require the compilation step and are rather interpreted. It brings new
functions to applications and glue complex system together.
Uses of Scripting Languages Contd..
 bash: It is a scripting language to work in the Linux interface. It is a lot easier to use bash to create
scripts than other programming languages. It describes the tools to use and code in the command line
and create useful reusable scripts and conserve documentation for other people to work with.
 Node js: It is a framework to write network applications using JavaScript. Corporate users of
Node.js include IBM, LinkedIn, Microsoft, Netflix, PayPal,Yahoo for real-time web applications.
 Ruby: There are a lot of reasons to learn Ruby programming language. Ruby’s flexibility has allowed
developers to create innovative software. It is a scripting language which is great for web development.
 Python: It is easy, free and open source. It supports procedure-oriented programming and object-
oriented programming. Python is an interpreted language with dynamic semantics and huge lines of
code are scripted and is currently the most hyped language among developers.
 Perl: A scripting language with innovative features to make it different and popular. Found on all
windows and Linux servers. It helps in text manipulation tasks. High traffic websites that use Perl
extensively include priceline.com, IMDB.
Uses of Scripting Languages Contd..
 advantages of scripting languages:
 Easy learning: The user can learn to code in scripting languages quickly, not much knowledge of web
technology is required.
 Fast editing: It is highly efficient with the limited number of data structures and variables to use.
 Interactivity: It helps in adding visualization interfaces and combinations in web pages. Modern web pages
demand the use of scripting languages. To create enhanced web pages, fascinated visual description which
includes background and foreground colors and so on.
 Functionality: There are different libraries which are part of different scripting languages. They help in
creating new applications in web browsers and are different from normal programming languages.
 Application of Scripting Languages: Scripting languages are used in many areas:
 Scripting languages are used in web applications. It is used in server side as well as client side. Server side
scripting languages are: JavaScript, PHP, Perl etc. and client side scripting languages are: JavaScript, AJAX,
jQuery etc.
 Scripting languages are used in system administration. For example: Shell, Perl, Python scripts etc.
 It is used in Games application and Multimedia.
 It is used to create plugins and extensions for existing applications.
Installation Steps for perl
 Step1: Download perl
https://www.activestate.com/products/activeperl/downloads/
 step2:To check if you have perl installed on aWindows PC, search in the start bar
for Perl or run the following on the Command Line (cmd.exe): C:UsersYour
Name>perl --version
 Step3: change by default path from current working directory to below path
 c:/>cd perl
 C:/>cd scripts
 Step4: C:UsersYour Name>perl sample.pl
Installation Steps for perl
Script:
#test demo
print "Enter your name: ";
$name=<STDIN>;
print "Hello ${name}";
Installation Steps for Ruby
 Step1: Download Ruby
 https://www.ruby-lang.org/en/downloads/
 step2:To check if you have Ruby installed on aWindows PC, search in the start bar
for Ruby or run the following on the Command Line (cmd.exe): C:UsersYour
Name>Ruby --version
 Step3: change by default path from current working directory to below path
 c:/>cd ruby
 C:/>cd scripts
 Step4: C:UsersYour Name>ruby sample.rb
Class 17-18 Introduction to Perl.pdf bbbbbb

More Related Content

Similar to Class 17-18 Introduction to Perl.pdf bbbbbb

dotNET frameworks
dotNET frameworksdotNET frameworks
dotNET frameworksnawal saad
 
Net framework
Net frameworkNet framework
Net frameworkjhsri
 
Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management systemYesu Raj
 
Top Programming Languages of 2020
Top Programming Languages of 2020Top Programming Languages of 2020
Top Programming Languages of 2020Ikbal Ahmed
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management systemYesu Raj
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management systemYesu Raj
 
Full Stack Web Development
Full Stack Web DevelopmentFull Stack Web Development
Full Stack Web DevelopmentSWAGATHCHOWDARY1
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checkerYesu Raj
 
Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142Ly Nguyen Bui
 
Difference between .net and asp.net all you need to know
Difference between .net and asp.net  all you need to knowDifference between .net and asp.net  all you need to know
Difference between .net and asp.net all you need to knowsophiaaaddison
 
.Net framework
.Net framework.Net framework
.Net frameworkViv EK
 
What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?Natural Group
 
1-.NET Introduction.pptx
1-.NET Introduction.pptx1-.NET Introduction.pptx
1-.NET Introduction.pptxRKAggarwal6
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming worldJaskaran Singh
 
Web programming by kiran and team
Web programming by kiran and teamWeb programming by kiran and team
Web programming by kiran and teamHemanth Kumar N
 

Similar to Class 17-18 Introduction to Perl.pdf bbbbbb (20)

dotNET frameworks
dotNET frameworksdotNET frameworks
dotNET frameworks
 
Net framework
Net frameworkNet framework
Net framework
 
Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management system
 
Top Programming Languages of 2020
Top Programming Languages of 2020Top Programming Languages of 2020
Top Programming Languages of 2020
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
Full Stack Web Development
Full Stack Web DevelopmentFull Stack Web Development
Full Stack Web Development
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checker
 
Dot net
Dot netDot net
Dot net
 
Xml & scripting
Xml & scriptingXml & scripting
Xml & scripting
 
Programming language
Programming languageProgramming language
Programming language
 
Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142Fundamental of-web design-trends-20142
Fundamental of-web design-trends-20142
 
Difference between .net and asp.net all you need to know
Difference between .net and asp.net  all you need to knowDifference between .net and asp.net  all you need to know
Difference between .net and asp.net all you need to know
 
.Net framework
.Net framework.Net framework
.Net framework
 
What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?What is ASP.NET and Why do we need it?
What is ASP.NET and Why do we need it?
 
1-.NET Introduction.pptx
1-.NET Introduction.pptx1-.NET Introduction.pptx
1-.NET Introduction.pptx
 
Chapter1
Chapter1Chapter1
Chapter1
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming world
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
Web programming by kiran and team
Web programming by kiran and teamWeb programming by kiran and team
Web programming by kiran and team
 

Recently uploaded

Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...babafaisel
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdftbatkhuu1
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130Suhani Kapoor
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentationamedia6
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Call Girls in Nagpur High Profile
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation decktbatkhuu1
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfAmirYakdi
 
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...BarusRa
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja Nehwal
 
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️soniya singh
 
Case Study of Hotel Taj Vivanta, Pune
Case Study of Hotel Taj Vivanta, PuneCase Study of Hotel Taj Vivanta, Pune
Case Study of Hotel Taj Vivanta, PuneLukeKholes
 
VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...
VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...
VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...Call Girls in Nagpur High Profile
 
The Art of Batik, template ppt aesthetic
The Art of Batik, template ppt aestheticThe Art of Batik, template ppt aesthetic
The Art of Batik, template ppt aestheticTiaFebriani
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxjanettecruzeiro1
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Servicearoranaina404
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...Call Girls in Nagpur High Profile
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...Call Girls in Nagpur High Profile
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfParomita Roy
 

Recently uploaded (20)

Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
 
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentation
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
 
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
 
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
 
Case Study of Hotel Taj Vivanta, Pune
Case Study of Hotel Taj Vivanta, PuneCase Study of Hotel Taj Vivanta, Pune
Case Study of Hotel Taj Vivanta, Pune
 
VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...
VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...
VVIP Pune Call Girls Dange Chowk (8250192130) Pune Escorts Nearby with Comple...
 
The Art of Batik, template ppt aesthetic
The Art of Batik, template ppt aestheticThe Art of Batik, template ppt aesthetic
The Art of Batik, template ppt aesthetic
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
 

Class 17-18 Introduction to Perl.pdf bbbbbb

  • 1. Scripting Languages Dr. Dilshad Ansari, Dept of CSE, CMR College of Engineering & Technology Email :- m.dilshadcse@cmrcet.org Mob: +91-9816387077
  • 2. Unit III Introduction to PERL and Scripting Scripts and Programs, Origin of Scripting, Scripting Today, Characteristics of Scripting Languages, Uses for Scripting Languages, Web Scripting, and the universe of Scripting Languages. PERL- Names and Values, Variables, Scalar Expressions, Control Structures, arrays, list, hashes, strings, pattern and regular expressions, subroutines
  • 3. Programming Scripting  Programming languages are compiled to machine code and run on the hardware of the underlying Operating system. One must use a certain IDE (Integrated Development Environment) to make use of programming languages. The programmer provides a set of instructions for a computer to achieve a certain goal. Certain algorithms can also be implemented by writing programs.  Scripting languages have evolved to become powerful. Now they are not limited to create small scripts to automate operations on a software system. One can also build a rich application with scripting languages. It can manipulate, customize and automate the facilities of an existing system. Useful functionality is already available via an interface; scripting languages provide a mechanism for exposing functionality to program control.
  • 4. Scripts and Programs 1. Script is interpreted by Interpreter 2. Scripts can control another business applications Example  PHP controls web server  Java Script controls web browser  VB controls MS office application 3. Script can not executed as stand-alone Ex. Ruby, Python, R, Perl, Java script, PHP,VB,TCL etc.. Applications: 1.To automate certain tasks in a program 2. Extracting information from a data set 3. Less code as compared to traditional programming languages 1. Program is compiled by compiler 2. Program executed independently without the influence of another application Example C, C++,JAVA, C#, etc. Applications: 1.They typically run inside a parent program like scripts 2. More compatible while integrating code with mathematical models 3. Languages like JAVA can be compiled and then used on any platform.
  • 5. Origins of Scripting  Basically the use of the word ‘script’ in an UNIX operating system create the term ‘shell script’ for sequence of commands that were to be read from a file and follow in sequence as if they had been typed in at the keyword.  The name ‘script ‘ being used for a text file that was intended to be executed directly rather than being compiled to a different form of file prior to execution.  Other early occurrences of the term ‘script’ can be found. For example, in a DOS-based system, use of a dial-up connection to a remote system required a communication package that used proprietary language to write scripts to automate the sequence of operations required to establish a connection to a remote system.  Note that if we regard a scripts as a sequence of commands to control an application or a device, a configuration file such as a UNIX ‘make file’ could be regard as a script.  However, scripts only become interesting when they have the added value that comes from using programming concepts such as loops and branches
  • 6. scripting languages?  A scripting language is a programming language that executes tasks within a special run-time environment by an interpreter instead of a compiler. They are usually short, fast, and interpreted from source code or bytecode.  Using a scripting language is preferable depending on your goals and environment. As they are a series of commands executed with no need for a compiler, they are cross-platform and do not require special software to be installed in order to run — except for a web browser, of course. Types of scripting languages There are two main types: server-side and client-side. They differ on where the code is run from, which affects not only the actual languages chosen but also the performance and their capabilities. 1. Server-side scripting language 2. Client-side scripting language
  • 7. Types of S L  Server-side scripting language:-  The term server-side scripting language refers to those that run off a web server. Since it performs from the back-end side, the script is not visible to the visitor. Because of that, it is a more secure approach.  They are often used to create dynamic websites and platforms, handle user queries, and generate and provide data and others. A famous example of server-side scripting is the use of PHP inWordPress.  Examples: PHP, Python, Node.js, Perl, and Ruby.
  • 8. Types of S L Client-side scripting language:  Unlike the above, client-side scripting languages run off the user’s browser. It is usually performed at the front-end, which makes it visible to visitors and makes it less vulnerable to exploits and leaks. As such, it is often used to build user interfaces and lighter functionality such as that.  Since it runs locally, they usually provide better performance and, therefore, do not strain your server.  Examples: HTML, CSS, jQuery, and JavaScript.
  • 9. Scripting Today  Scripting allows application to be developed much faster than traditional methods.  Use to manipulate, customize, automate the existing system  EXAMPLE. Use of client side scripting and Making dynamic HTML for interactive and feature rich enhanced web pages  UNIX OS used shell script for system management for administration aspect  Apache web server has an embedded PERL interpreter for CGI scripts
  • 11. Characteristics of Scripting Languages  Integrated Compile and Run:  SL are characterized as interpreted languages.  SL operate on an immediate execution basis, without the need to issue separate commands to compile the program and then to run the resulting object file, and without the need to link extensive libraries into the object code.  Low overhead and ease of use:  Less no.of data types  Less no. of data structures  Enhanced Functionality:  provide string manipulation based on the use of regular expressions, while other languages provide easy access to low-level operating system facilities or to the API, or object exported by an application  Efficiency is not an issue:  Abstraction:  Information hiding, to spare users the details of internal variable types, data storage, and memory management.
  • 12. Web Scripting  Web is the most fertile areas for the application of scripting languages.  Web scripting divides into three areas a. processing forms b. creating pages with enhanced visual effects and user interaction c. generating pages ’on the fly’ from material held in database.
  • 13. Web Scripting Contd.. Processing Web forms: In the original implementation of the web , when the form is submitted for processing, the information entered by the user is encoded and sent to the server for processing by a CGI script that generates an HTML page to be sent back to the Web browser. This processing requires string manipulation to construct the HTML page that constitutes the replay, and may also require system access , to run other processes and to establish network connections. Perl is also a language that uses CGI scripting. Alternatively for processing the form with script running on the server it possible to do some client –side processing within the browser to validate form data before sending it to the server by using JavaScript,VBScript etc. Dynamic Web pages: ‘Dynamic HTML’ makes every component of a Web page (headings, anchors, tables etc.) a scriptable object. This makes it possible to provide simple interaction with the user using scripts written in JavaScript/Jscript or VBScript, which are interpreted by the browser. Microsoft’s ActiveX technology allows the creation of pages with more elaborate user interaction by using embedded visual objects called ActiveX controls. These controls are scriptable objects, and can in fact be scripted in a variety languages. This can be scripted by using Perl scripting engine.  Dynamically generated HTML: Another form of dynamic Web page is one in which some or all of the HTML is generated by scripts executed on the server. A common application of the technique is to construct pages whose content is retrieved from a database. For example, Microsoft’s IIS web server implements Active Server Pages (ASP), which incorporate scripts in Jscript orVBScript
  • 14. Uses of Scripting Languages  A scripting language is a programming language designed for integrating and communicating with other programming languages.  The scripting language is basically a language where instructions are written for a run time environment.  They do not require the compilation step and are rather interpreted. It brings new functions to applications and glue complex system together.
  • 15. Uses of Scripting Languages Contd..  bash: It is a scripting language to work in the Linux interface. It is a lot easier to use bash to create scripts than other programming languages. It describes the tools to use and code in the command line and create useful reusable scripts and conserve documentation for other people to work with.  Node js: It is a framework to write network applications using JavaScript. Corporate users of Node.js include IBM, LinkedIn, Microsoft, Netflix, PayPal,Yahoo for real-time web applications.  Ruby: There are a lot of reasons to learn Ruby programming language. Ruby’s flexibility has allowed developers to create innovative software. It is a scripting language which is great for web development.  Python: It is easy, free and open source. It supports procedure-oriented programming and object- oriented programming. Python is an interpreted language with dynamic semantics and huge lines of code are scripted and is currently the most hyped language among developers.  Perl: A scripting language with innovative features to make it different and popular. Found on all windows and Linux servers. It helps in text manipulation tasks. High traffic websites that use Perl extensively include priceline.com, IMDB.
  • 16. Uses of Scripting Languages Contd..  advantages of scripting languages:  Easy learning: The user can learn to code in scripting languages quickly, not much knowledge of web technology is required.  Fast editing: It is highly efficient with the limited number of data structures and variables to use.  Interactivity: It helps in adding visualization interfaces and combinations in web pages. Modern web pages demand the use of scripting languages. To create enhanced web pages, fascinated visual description which includes background and foreground colors and so on.  Functionality: There are different libraries which are part of different scripting languages. They help in creating new applications in web browsers and are different from normal programming languages.  Application of Scripting Languages: Scripting languages are used in many areas:  Scripting languages are used in web applications. It is used in server side as well as client side. Server side scripting languages are: JavaScript, PHP, Perl etc. and client side scripting languages are: JavaScript, AJAX, jQuery etc.  Scripting languages are used in system administration. For example: Shell, Perl, Python scripts etc.  It is used in Games application and Multimedia.  It is used to create plugins and extensions for existing applications.
  • 17. Installation Steps for perl  Step1: Download perl https://www.activestate.com/products/activeperl/downloads/  step2:To check if you have perl installed on aWindows PC, search in the start bar for Perl or run the following on the Command Line (cmd.exe): C:UsersYour Name>perl --version  Step3: change by default path from current working directory to below path  c:/>cd perl  C:/>cd scripts  Step4: C:UsersYour Name>perl sample.pl
  • 18. Installation Steps for perl Script: #test demo print "Enter your name: "; $name=<STDIN>; print "Hello ${name}";
  • 19. Installation Steps for Ruby  Step1: Download Ruby  https://www.ruby-lang.org/en/downloads/  step2:To check if you have Ruby installed on aWindows PC, search in the start bar for Ruby or run the following on the Command Line (cmd.exe): C:UsersYour Name>Ruby --version  Step3: change by default path from current working directory to below path  c:/>cd ruby  C:/>cd scripts  Step4: C:UsersYour Name>ruby sample.rb