...
Code Block | ||||
---|---|---|---|---|
| ||||
sub read_users { open( my $filehandle, "<", "/etc/shadow") or return; my @users = <$filehandle>; return @users; } |
Exceptions
EXP00-EX1: This recommendation applies specifically to functions called in a list context. If you can guarentee that some function will never be called in a list context, then that function may return undef
.
Risk Assessment
Improper interpretation of return undef
can lead to incorrect program flow.
...