… | |
… | |
41 | |
41 | |
42 | This is annoying, and doesn't shield against obvious mistakes such as |
42 | This is annoying, and doesn't shield against obvious mistakes such as |
43 | using C<"">, so one would even have to write (at least for the time |
43 | using C<"">, so one would even have to write (at least for the time |
44 | being): |
44 | being): |
45 | |
45 | |
46 | @{ defined $var->[0] ? $var->[0] : [] } |
46 | @{ defined $var->[0] ? $var->[0] : [] } |
47 | |
47 | |
48 | ... which nobody with a bit of common sense would consider |
48 | ... which nobody with a bit of common sense would consider |
49 | writing. |
49 | writing: clear code is clearly something else. |
50 | |
50 | |
51 | Curiously enough, sometimes perl is not so strict, as this works even with |
51 | Curiously enough, sometimes perl is not so strict, as this works even with |
52 | C<use strict> in scope: |
52 | C<use strict> in scope: |
53 | |
53 | |
54 | for (@{ $var->[0] }) { ... |
54 | for (@{ $var->[0] }) { ... |