< Perl Programming < Keywords

The m keyword

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

Syntax

  m/…[/]

Examples

 # 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

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.