in reply to Could we save the memory occupied by "undef" in an array?
Set::IntSpan might help, depending on what you are doing.