summaryrefslogtreecommitdiffstats
path: root/src/test/return_value.t
blob: 89cf9ee323e54e6742cb21b9c952a3bc74a5bc69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
die; xxx();                              unreachable code

exit 1; xxx();                           unreachable code

$xxx or die;                             

next if $xxx;

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

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

$xxx && yyy();                           value is dropped

`xxx`;                                   value is dropped

/(.*)/;                                  value is dropped

'xxx';                                   value is dropped

'xxx' if $xxx;                           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

$xxx = push @l, 1                        () context not accepted here
                                         context () is not compatible with context scalar