1 ## name use without regex
5 my @matches = ($1, $2);
7 #-----------------------------------------------------------------------------
9 ## name void use without regex
14 #-----------------------------------------------------------------------------
16 ## name regex but no check on success
19 'some string' =~ m/(s)/;
22 #-----------------------------------------------------------------------------
24 ## name inside a checkblock, but another regex overrides
28 'some string' =~ m/(s)/;
32 #-----------------------------------------------------------------------------
40 elsif ($foo =~ s/(b)//) {
50 while ($str =~ m/\G(.)/cg) {
54 print $0; # not affected by policy
55 print $_; # not affected by policy
56 print $f1; # not affected by policy
58 my $result = $str =~ m/(.)/;
63 #-----------------------------------------------------------------------------
65 ## name ternary passes
68 print m/(.)/ ? $1 : 'undef';
69 print !m/(.)/ ? 'undef' : $1;
70 print s/(.)// ? $1 : 'undef';
71 print !s/(.)// ? 'undef' : $1;
75 $foo = !s/(.)// || $1;
77 #-----------------------------------------------------------------------------
79 ## name Regression for PPI::Statement::Expressions
87 #-----------------------------------------------------------------------------
89 ## name Regression for ternaries with structures
93 $str =~ m/(.)/xms ? foo($1) : die;
94 $str =~ m/(.)/xms ? [$1] : die;
95 $str =~ m/(.)/xms ? { match => $1 } : die;