ETOOBUSY 🚀 minimal blogging for the impatient
I discovered that List::Util became wider and I think it’s a good thing.
I also remember that somebody wanted more utilities to end up there, others were against this and eventually frustration led to List::MoreUtils, sadly not in CORE.
I can only imagine how much self-control (or smoothing through time) went into the following terse description that we find today:
List::MoreUtils provides some trivial but commonly needed functionality on lists which is not going to go into List::Util.
Anyway, fast-forward to today, I notice that both modules kind of exploded! This is good IMHO.
I’m particularly happy about a few additions in the CORE module, of course, because it’s CORE and we can count on it everywhere we find Perl. Well, unless your Linux distribution decides to redefine what CORE means… This is sadly another story.
I like the appearance of sample, to get some distinct items out of a list:
use List::Util 'sample';
my $password = join '-', sample 4, @dictionary;
- it seems to me that it’s extremely easy to just use splice for this;
- I’m not sure to follow the logic by which both functions accept a negative value to go “from the other end”.
Stay safe folks, please!