Difference between revisions of "Perl"

From Teknologisk videncenter
Jump to: navigation, search
m (Development tools)
m (ActiveState Perl and Padre)
Line 5: Line 5:
 
*[[Perl/IDE|Integrated Development Environment]] - IDE - for Perl
 
*[[Perl/IDE|Integrated Development Environment]] - IDE - for Perl
 
==ActiveState Perl and Padre==
 
==ActiveState Perl and Padre==
#Download and install ActicePerl from [http://www.activestate.com/activeperl ActiceState]
+
#Download and install ActivePerl from [http://www.activestate.com/activeperl ActiveState]
 
#Open a command prompt and enter the command '''PPM'''
 
#Open a command prompt and enter the command '''PPM'''
 
#Search for '''Padre''' (The Perl IDE - Integrated Development Environment)
 
#Search for '''Padre''' (The Perl IDE - Integrated Development Environment)

Revision as of 13:22, 23 May 2012

Development tools

ActiveState Perl and Padre

  1. Download and install ActivePerl from ActiveState
  2. Open a command prompt and enter the command PPM
  3. Search for Padre (The Perl IDE - Integrated Development Environment)
  4. Install Padre
  5. Start Padre and start playing

Regular expressions

One liners

Search and replace in files

You could also use find and sed.

perl -pi -w -e 's/SEARCH/REPLACE/g;' *.php
  • e means execute the following line of code.
  • i means edit in-place
  • w write warnings
  • p loop