in reply to Function Prototypes
Use undef to mean 'BAD' and your sample sub becomes:
sub ConfigRead { my %hArgs = @_; # stick some cool stuff in their variables }
Then instead of:
die "horribly" if $hArgs{sFILE} eq 'BAD';
you can:
die "horribly" if !exists $hArgs{sFILE};
or:
$hArgs{sFILE} //= 'default.sFile';
as appropriate.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |