perl Command Examples

The Perl 5 language interpreter. More information: https://www.perl.org.

perl -n -e 'print if m/{{regex1}}/ and m/{{regex2}}/i'

perl -n -E 'say $1 if m/{{before}} ( {{group_regex}} ) {{after}}/x'

perl -i'.bak' -p -e 's/{{regex}}/{{replacement}}/g' {{path/to/files}}

perldoc perlrun ; perldoc module ; perldoc -f splice; perldoc -q perlfaq1