Difference between revisions of "Perl"

From Teknologisk videncenter
Jump to: navigation, search
m (One liners)
m (One liners)
Line 7: Line 7:
 
*[[Regular Expression Perl]] Mainpage
 
*[[Regular Expression Perl]] Mainpage
 
= One liners =
 
= One liners =
*See [[Regular_Expression_Perl/Oneliners]]
+
*See [[Regular Expression Perl/Oneliners]]
 
== Search and replace in files ==
 
== Search and replace in files ==
 
You could also use find and sed.
 
You could also use find and sed.

Revision as of 06:20, 4 September 2010

Development tools

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