summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/pod/perlrequick.pod
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/pod/perlrequick.pod')
-rw-r--r--gnu/usr.bin/perl/pod/perlrequick.pod5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/pod/perlrequick.pod b/gnu/usr.bin/perl/pod/perlrequick.pod
index bb15c46e5c7..7abd895e8a8 100644
--- a/gnu/usr.bin/perl/pod/perlrequick.pod
+++ b/gnu/usr.bin/perl/pod/perlrequick.pod
@@ -380,8 +380,9 @@ C<$pattern> won't be changing, use the C<//o> modifier, to only
perform variable substitutions once. If you don't want any
substitutions at all, use the special delimiter C<m''>:
- $pattern = 'Seuss';
- m'$pattern'; # matches '$pattern', not 'Seuss'
+ @pattern = ('Seuss');
+ m/@pattern/; # matches 'Seuss'
+ m'@pattern'; # matches the literal string '@pattern'
The global modifier C<//g> allows the matching operator to match
within a string as many times as possible. In scalar context,