Perl Tutorial : Perl data types
Perl Tutorial : Perl Operators
Perl Tutorial : Perl loops
Perl Tutorial : Perl Conditionals
Perl Tutorial : Perl Subroutines
Perl Tutorial : Perl regex
Perl Tutorial : Perl Files
Perl Tutorial : Perl & Databases
Perl Tutorial : Perl OOPs
Perl Tutorial : Perl signals
Perl Tutorial : Perl threads
Perl Tutorial : Perl Debugging

Introcution to Perl CGI

Introduction to modperl
Home >>
Program that prints out Hello, World! (let's call our file hello.pl):
  #!/usr/bin/perl
  print "Hello, World!\n";
  • The first line signifies where the perl interpreter resides on the host system. This is usually /usr/bin/perl on Linux systems and /bin/perl under *NIX systems.
  • The next statment is a simple print statement. That's it.
  • \n is used for printing new line.
Switches
The perl interpreter has useful switches.
  • The -c switch lets perl check for syntax only, without running the actual program.
  • The -w turns on all useful warnings. You should ALWAYS develop your programs under -w.

So how would you actually run this program? You could run it as:
$perl -w hello.pl
or we could make the perl file executable, by using the chmod command:
$chmod 700 hello.pl
$./hello.pl


How do I issue the -w flag? Simple, put it in the perl line at line
#!/usr/bin/perl -w. 
print "Hello, World!\n";

Perl functions

scalars and strings

lc
ord

regex (regular expressions)

arrays

shift
split

More..

eval
Share |

call a stored procedure
Home
Perl Typeglob

Perl examples

  • How to use Data::Dumper?
  • How to parse config file?
  • Include external module in perl..
  • Download perl

    download stable version of perl
    Perl 5.10.1
    Perl interview Questions
    sed tutorial
    awk tutorial

    Join us on Google Groups

    Subscribe to perl
    Email:
    Visit this group
    Perl Jobs


    privacy | sitemap | disclaim | contact us
    © 2009 perlhome.com