Website based on my experience working as System Administrator

LINUX INFORMATION WEBSITE

This site is dedicated to providing tutorials, help, guides and links for Linux users.
HOME PAGE
LINUX COMMANDS
   
   
   
   
   
   
   
   
   

LINUX COMMANDS

Contents | Previous | Next

How do I create, and run a Perl script?

- 1 -

Enter:

vi hello.pl

Note:

To identify all your Perl programs, use a .pl file extension.

- 2 -

Enter the following program, then save and exit Vi:


#!/usr/bin/perl -w print "Hello, Perl!\n";

- 3 -

To run the program you need to make the file executable. To do this, enter:

chmod +x hello.pl

Note:

You only need to make the file executable once. After that you just modify and run.

- 4 -

To run the program, enter:

./hello.pl

Contents | Previous | Next

 
Last Update: Jan 2003

HOME | CONTACT | FAQ'S | TRICKS & TIPS | WEIRD NEWS
This Material has been taken from different sources. Its free for anyone to use and reproduce.