#!/usr/bin/perl use strict; use warnings; my $text = 'This is a text string.'; print $text =~ m/is a/, " - m//\n"; # Default delimiter, so the "m" can be omitted print $text =~ /is a/, " - //\n"; # Custom delimiters, so the "m" is mandatory print $text =~ m#is a#, " - m##\n"; print $text =~ m!is a!, " - m!!\n"; print $text =~ m^is a^, " - m^^\n"; # Open/close punctuation is used in pairs print $text =~ m[is a], " - m[]\n"; print $text =~ m(is a), " - m()\n"; print $text =~ m, " - m<>\n"; #### 1 - m// 1 - // 1 - m## 1 - m!! 1 - m^^ 1 - m[] 1 - m() 1 - m<>