Home > Linux > Little help on Perl

Little help on Perl

What is Perl?

From the Perl documentation:

Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast of thousands. It derives from the ubiquitous C programming language and to a lesser extent from sed, awk, the Unix shell, and at least a dozen other tools and languages. Perl’s process, file, and text manipulation facilities make it particularly well-suited for tasks involving quick prototyping, system utilities, software tools, system management tasks, database access, graphical programming, networking, and world wide web programming. These strengths make it especially popular with system administrators and CGI script authors, but mathematicians, geneticists, journalists, and even managers also use Perl. Maybe you should, too.

  • Get the Perl manual.
    • [root@goliath ~]# man perl
  • View Perl documentation.
    • [root@goliath ~]# man perldoc
  • Perl introduction for beginners.
    • [root@goliath ~]# perldoc perlintro
  • Perl OO tutorial for beginners.
    • [root@goliath ~]# perldoc perlboot
  • Perl OO tutorial, part 1.
    • [root@goliath ~]# perldoc perltoot
  • Perl OO tutorial, part 2.
    • [root@goliath ~]# perldoc perltooc
  • Perl OO tricks and examples.
    • [root@goliath ~]# perldoc perlbot
  • Perl regular expressions quick start.
    • [root@goliath ~]# perldoc perlrequick
  • Perl regular expressions tutorial.
    • [root@goliath ~]# perldoc perlretut
  • List the modules that come pre-installed with the standard Perl package.
    • [root@goliath ~]# perldoc perlmodlib
  • Lists the optional modules that are installed in your system that don’t come with Perl by default.
    • [root@goliath ~]# perldoc perllocal
  • Check if a module is installed
    • [root@goliath ~]# perl -MTie::Hash -e 1
  • Get a list of installed modules – Using a script
    • [root@goliath ~]# perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e ‘find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC’

CPAN is the Comprehensive Perl Archive Network, a large collection of Perl software and documentation. Note that CPAN is also the name of a Perl module, CPAN.pm, which is used to download and install Perl software from the CPAN archive.
Reference – http://www.cpan.org/

  • Automatic installation using the CPAN module
    • [root@goliath ~]# perl -MCPAN -e ‘install Net::DNS’
  • Installing cpan modules manually
    • unzip
    • perl Makefile.PL
    • make
    • make test
    • make install

Hope thses tip’s will help you to get on with perl.

Categories: Linux
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: