Perl Programming/Keywords/m

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: lt Keywords Next: map

The m keyword[edit | edit source]

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

Syntax[edit | edit source]

  m/…[/]

Examples[edit | edit source]

 # 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 | edit source]

Previous: lt Keywords Next: map