in reply to default value for a scalar

I understand your issue now... the arguments to $osVal and $odVal can either be undef or the empty string when the default value should be used for them.

In that case, a convenient solution is the ||= operator:

$odVal ||= 0; $osVal ||= 0;

Replies are listed 'Best First'.
Re^2: default value for a scalar
by rightfield (Sexton) on Apr 19, 2008 at 22:08 UTC
    Thank you pc88mxer your solution worked first time. Warm regards.