Perl Programming/Keywords/m

Previous: lt Keywords Next: map

The m keyword edit

m is a regular expression match operator used als m//.

Syntax edit

  m/…[/]

Examples edit

 # Shorthand form uses // to quote the regular expression
 $Text =~ /search words/;

 # The m function allows you to use your choice of quote marks
 $Text =~ m|search words|;
 $Text =~ m{search words};
 $Text =~ m<search words>;
 $Text =~ m#search words#;

See also edit

Previous: lt Keywords Next: map