Sunday, March 16, 2014

Perl Programming : Running your first Perl Program

There are 3 ways by which you can run a program :

1 INTERACTIVE INTERPRETER:

You can run a program in unix termilap just by enclosing the code in doublw codes

Syntax : $ perl -e "<<you perl code >>"


Example : $perl  -e  "print "hello from perl ";"


2 SCRIPT FROM THE COMMAND-LINE:
Type the code inside a textfile (use any text editor like vi r notepad) . save with ".pl" extention.run the file with filename.


Example :
C:> notepad script.pl

script.pl
#!/usr/bin/perl
print "hello from perl ";


C:> script.pl

3 INTEGRATED DEVELOPMENT ENVIRONMENT:

We can run Perl from a graphical user interface (GUI) environment.You can also use Eclipse Plugin EPIC - Perl Editor and IDE for Eclipse.

Perl Programming : Windows installation

Perl interpreter installation has hassle free steps as fallows 
  • go to the link for Strawberry Perl installation on Windows http://strawberryperl.com\
  • Download your system compatible version (either 32bit or 64bit version).
  • Run the downloaded file . This brings up the Perl install wizard, which is really easy to use.Wait until the install finishes , and you're ready to run your first Perl program.

Perl Programming : Introduction

Perl stands for Practical Extraction and Report Language

Perl is a open source language available for all kinds of platform.Perl is a very power full language .

Some of the important features are :
  • Takes the best features from other languages
  • Database integration interface DBI supports many DB vendors.
  • Works with HTML, XML, and other mark-up languages.
  • Supports both procedural and object-oriented programming.
  • Extensible.Third party modules available from the Comprehensive Perl Archive Network (CPAN).