[EMAIL PROTECTED] (Wren Argetlahm) writes:
I've recently discovered the joys of return undef; for
error catching, but I'm having problems when the
subroutine returns a hash (unless there's an error).
Something like the following:
%hash = subroutine($input) or error($error);
returns the
--- Piers Cawley [EMAIL PROTECTED] wrote:
This is because 'return undef;' is good, but
'return;' is better. It
returns the correct, context dependent
representation of false.
That seems to have fixed my problem, but I'm not sure
why it works. My error($error) is now something to
the effect
On 1/10/04 wren argetlahm wrote:
--- Piers Cawley [EMAIL PROTECTED] wrote:
This is because 'return undef;' is good, but 'return;' is better. It
returns the correct, context dependent representation of false.
That seems to have fixed my problem, but I'm not sure why it works. My
error($error) is
I've recently discovered the joys of return undef; for
error catching, but I'm having problems when the
subroutine returns a hash (unless there's an error).
Something like the following:
%hash = subroutine($input) or error($error);
returns the expected odd number of elements in hash
assignment