in reply to Re: undefined or zero: loking for an elegant solution
in thread undefined or zero: looking for an elegant solution

$nr = $metricOpenTasks{$relWeek}{$cc}{nr} || 1;

Replies are listed 'Best First'.
Re^3: undefined or zero: loking for an elegant solution
by shmem (Chancellor) on Feb 26, 2010 at 12:49 UTC
    yes *facepalm* of course ;-)

    The construct with parens is necessary for substitution after assignment, not just for plain conditional assignment.

    ($foo = $bar) =~ s/$pat/$subst/; # operates on $foo