summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test/return_value.t
blob: e826c087d564fcda9cd4ba69e89baae38ade294e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if ($xxx or $yyy) {}                     value should be dropped
                                         context () is not compatible with context scalar

if ($xxx and $yyy) {}                    value should be dropped
                                         context () is not compatible with context scalar

$xxx && yyy();                           value is dropped

`xxx`;                                   value is dropped

/(.*)/;                                  value is dropped

map { xxx($_) } @l;                      if you don't use the return value, use "foreach" instead of "map"

$xxx = chomp;                            () context not accepted here
                                         context () is not compatible with context scalar