- Use: $x =~ //
- Use: $x =~ m//
or m## or m"" or m{} or anything else you care to choose - Use: qr()
or qr## or qr"" or qr{}
The usual choices are // () ## and ""
$x =~ /andrew/;
$x =~ m/andrew/;
$x =~ m#andrew#;
$x =~ qr(andrew);
#matches speachmarks
$x =~ m/"andrew"/;
#matches HTML tags - there's no need to escape the / in </b>
$x =~ qr# <b>andrew</b> #;
No comments:
Post a Comment