Perl Scripts
(March 2006)

Perl is a powerful interpreted programming language.
This page presents some perl scripts.
Table of contents

Substitutions

Multi-line substitutions in a file

Substitutions

shell> perl -pe 's/<([^>]*)>/[\1]/g'
one <two> three <4> 5
one [two] three [4] 5

Multi-line substitutions in a file

shell> perl -pe 'undef $/;s/NEWTYPE.*?ENDNEWTYPE\s*;//sg' < file.txt
Explanations: