Just a rendition of List::Util::uniqnum, minus the bugs (hopefully).