http://qs321.pair.com?node_id=911994


in reply to Re^2: Filling in missing values in an array
in thread Filling in missing values in an array

Though I'm not quite sure how tests 3-5 are supposed to go
Neither was I! So I made it die (a.k.a throws an exception) when the array consists only of NULLs. Garbage in, garbage out, as we used to say. Exceptions prevent the garbage leaking out.

If you decide it should do something other than die, just change this line:

die "No values found" if @arr && 0 == grep $_ ne '_', @arr;