in reply to if else and not reachable coding style
sub sg { my $result; die "COND isn't valid" if (COND eq undef); if (COND) { $result = 1; } else { $result = 2; }; die "result isn't valid" if ($result eq undef); return $result; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: if else and not reachable coding style
by radiantmatrix (Parson) on Mar 09, 2006 at 17:29 UTC |