In Perl, how can I pad an array with zeroes? I know that I can get the length of the array, and then do a for loop with a push, but is there a more palatable way?
For example:
my @array = pad_with_zeroes("foo", "bar", "baz", 6);
# @array now eq ("foo", "bar", "baz", 0, 0, 0)
Is there anything in (for example) List::Util
or a similar common module that can do this, as well?