or download this
$str = "text with some pattern in it";
$c = $str =~ / (some pattern) /; # sets $c to the numeric value "
+1"
@m = $str =~ / (some pattern) /; # assigns "some pattern" as sole
+ element of @m
( $m ) = $str =~ / (some pattern) /; # sets $m to "some pattern"