Perl Regular Expression Syntax

Syntax of a regular expression can be one of:
Type Meaning Example(s)
/exp/

m|exp|
match

match but char following is new delimiter
/foo/

m!World!; m{World}; m"/perl";
s/exp1/exp2/ substitute $x = "Feed the cat!";
$x =~ s/cat/hacker/;
# $x is now "Feed the hacker!"
tr/exp1/exp2/ translate character in exp1 by
corressponding one in exp2
tr/A-Z/a-z/
# translates upper case letters to lower case

Variable subtitution works in regex:
   $foo = 'house';
   'housecat' =~ /${foo}cat/; # matches