- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to run Perl Program?
The following are the different ways to start Perl.
Interactive Interpreter
You can enter Perl and start coding right away in the interactive interpreter by starting it from the command line. You can do this from Unix, DOS, or any other system, which provides you a command-line interpreter or shell window.
$perl -e <perl code> # Unix/Linux or C:>perl -e <perl code> # Windows/DOS
Here is the list of all the available command-line options −
Sr.No. | Option & Description |
---|---|
1 | -d[:debugger] Runs program under a debugger |
2 | -Idirectory Specifies @INC/#include directory |
3 | -T Enables tainting checks |
4 | -t Enables tainting warnings |
5 | -U Allows unsafe operations |
6 | -w Enables many useful warnings |
7 | -W Enables all warnings |
8 | -X Disables all warnings |
9 | -e program Runs Perl script sent in a program |
10 | file Runs Perl script from a given file |
Script from the Command-line
A Perl script is a text file, which keeps Perl code in it and it can be executed at the command line by invoking the interpreter on your application, as in the following −
$perl script.pl # Unix/Linux or C:>perl script.pl # Windows/DOS
Integrated Development Environment
You can run Perl from a graphical user interface (GUI) environment as well. All you need is a GUI application on your system that supports Perl. You can download Padre, The Perl IDE. You can also use Eclipse Plugin EPIC - Perl Editor and IDE for Eclipse if you are familiar with Eclipse.
Before proceeding to the next chapter, make sure your environment is properly set up and working perfectly fine. If you are not able to set up the environment properly then you can take help from your system administrator.
All the examples given in subsequent chapters have been executed with v5.16.2 version available on the CentOS flavor of Linux.
- Related Articles
- How to run Python Program?
- How to run Java package program
- How to run a java program
- How to Run a Python Program
- How to run JavaTuples program in Eclipse?
- How to compile and run the C++ program?
- Perl First Program
- Java Program to Run Multiple Threads
- How to compile & run a Java program using Command Prompt?\n
- First CGI Program using Perl
- How do I run a Python program under Windows?
- How To Run JavaScript Online?
- How to create Array in Perl?
- How to use Formats in Perl?
- Run a Python program from PHP
