Perl: Difference between revisions

From /i/nsurgency W/i/ki
Jump to navigationJump to search
>Hitlerlol
No edit summary
>Psycatalyst
No edit summary
 
(23 intermediate revisions by 11 users not shown)
Line 1: Line 1:
Perl is a dynamic programming language created by Larry Wall and first released in 1987. Perl borrows features from a variety of other languages including [[C]], shell scripting (sh), AWK, sed and [[Lisp]].[1]
Perl is a dynamic programming language created by Larry Wall and was first released in 1987. Perl borrows features from a variety of other languages including [[C]], shell scripting (sh), AWK, sed and [[Lisp]].  


Structurally, Perl is a brainfuck comparable to that of [[brainfuck]].  
Perl is usually good for searching for data and matching variables. Structurally, most people believe that Perl is a brainfuck comparable to that of [[brainfuck]].  


For moar info, see http://anonym.to/http://en.wikipedia.org/wiki/Perl  
For moar info, see http://anonym.to/http://en.wikipedia.org/wiki/Perl  


Some of the tools the Insurgency uses, such as mt_pulse.pl, use Perl. [[Linux]] and BSD distros usually include Perl as a default package. Windows and Macfags should get ActivePerl from the link below.  
Some of the tools the Insurgency uses, such as mt_pulse.pl, use Perl. [[Linux]] and BSD distros usually include Perl as a default package. Windows users should get Strawberry Perl and Macfags should get ActivePerl from the link below.  


==== How to get perl====
= How to get Perl=
Windows
==Windows==  


1.) Download the Active state perl installer from;here  
1.) Download the Strawberry Perl installer from [http://strawberryperl.com/ here]


2.) Run the program and follow the instructions  
2.) Run the program and follow the instructions  


3.) Open Command prompt and run "perl -v", You should see "The is perl.." This means people is installed properly.  
3.) Open Command prompt and run "perl -v", You should see "The is perl.." This means Perl is installed properly.  


Linux  
==Linux==


On Ubuntu/Debian you can simply use the "apt-get" command  
On Ubuntu/Debian you can simply use the "apt-get" command  
Line 24: Line 24:
On Redhat/fedora  
On Redhat/fedora  


  sudo yum install perl  
  yum install perl  


on suse  
on suse  


  sudo yast install perl  
  yast install perl  


on Arch Linux  
on Arch Linux  


  sudo pacman -S perl  
  pacman -S perl  


on Gentoo  
on Gentoo  


  sudo emerge install perl  
  emerge -av perl  


If this fails to work you will have to compile from source.
===Manual Install===


 
   i.  Download Perl 5.13.1 from :  
   i.  Download Perl 5.8.1 from :  
         http://www.perl.com/CPAN/src/stable.tar.gz
         http://www.perl.com/CPAN/src/stable.tar.gz
   ii. Remove the old Perl from the system before building
   ii. Remove the old Perl from the system before building
Line 47: Line 46:
   p/s : Suggestion from jeremy
   p/s : Suggestion from jeremy
         # mv /usr/lib/perl5 /root/perl5backup
         # mv /usr/lib/perl5 /root/perl5backup
Installation :  
Installation :  


   i.  # tar xvzf stable.tar.gz
   i.  # tar xvzf stable.tar.gz
   ii.  # cd perl-5.8.1
   ii.  # cd perl-5.13.1
   iii. For more information , # ./Configure --help
   iii. For more information , # ./Configure --help
         # ./Configure -de \
         # ./Configure -de \
             -Dprefix=/usr \
             -Dprefix=/usr \
             -Dcccdlflags='-fPIC' \
             -Dcccdlflags='-fPIC' \
             -Darchname=i386-linux  
             -Darchname=i686-linux  
   iv.  # make
   iv.  # make
   v.  # make test
   v.  # make test
   vi.  # make install
   vi.  # make install
Post Installation :  
Post Installation :  


Line 75: Line 76:


  GET -ed www.yahoo.com
  GET -ed www.yahoo.com
=Learning Perl=
Though there are several books available to someone wanting to learn perl, O'Reilly's "Learning Perl" is widely considered to be the best book for newcomers to Perl.
It is available, along with the rest of O'Reilly's books on Perl [http://lulzcats.org/files/perl-bookshelf4.rar here].


[[Category:Programming]]
[[Category:Programming]]
[[Category:Utilities]]

Latest revision as of 16:16, 14 May 2011

Perl is a dynamic programming language created by Larry Wall and was first released in 1987. Perl borrows features from a variety of other languages including C, shell scripting (sh), AWK, sed and Lisp.

Perl is usually good for searching for data and matching variables. Structurally, most people believe that Perl is a brainfuck comparable to that of brainfuck.

For moar info, see http://anonym.to/http://en.wikipedia.org/wiki/Perl

Some of the tools the Insurgency uses, such as mt_pulse.pl, use Perl. Linux and BSD distros usually include Perl as a default package. Windows users should get Strawberry Perl and Macfags should get ActivePerl from the link below.

How to get Perl[edit]

Windows[edit]

1.) Download the Strawberry Perl installer from here

2.) Run the program and follow the instructions

3.) Open Command prompt and run "perl -v", You should see "The is perl.." This means Perl is installed properly.

Linux[edit]

On Ubuntu/Debian you can simply use the "apt-get" command

sudo apt-get install perl 

On Redhat/fedora

yum install perl 

on suse

yast install perl 

on Arch Linux

pacman -S perl 

on Gentoo

emerge -av perl 

Manual Install[edit]

  i.  Download Perl 5.13.1 from : 
        http://www.perl.com/CPAN/src/stable.tar.gz
  ii. Remove the old Perl from the system before building
        # rm -rf /usr/lib/perl5
  p/s : Suggestion from jeremy
        # mv /usr/lib/perl5 /root/perl5backup

Installation :

  i.   # tar xvzf stable.tar.gz
  ii.  # cd perl-5.13.1
  iii. For more information , # ./Configure --help
       # ./Configure -de \
           -Dprefix=/usr \
           -Dcccdlflags='-fPIC' \
           -Darchname=i686-linux 
  iv.  # make
  v.   # make test
  vi.  # make install

Post Installation :

  i.   # perl -MCPAN -e shell 
       Just Follow step by step. Use all the Default Answer.
  ii.  install Bundle::CPAN
  iii. install Bundle::LWP
  iv.  install Bundle::DBI
  v.   install DBD::mysql

To test the install run.

perl -v 

or

GET -ed www.yahoo.com

Learning Perl[edit]

Though there are several books available to someone wanting to learn perl, O'Reilly's "Learning Perl" is widely considered to be the best book for newcomers to Perl.

It is available, along with the rest of O'Reilly's books on Perl here.