in reply to Re: Generate list with array elements repeated x times
in thread Generate list with array elements repeated x times

Even simpler. I took out what was below my $last and used the same return line from my response to choroba with @dates instead of @mults. Works perfectly. Thanks toolic.

  • Comment on Re^2: Generate list with array elements repeated x times

Replies are listed 'Best First'.
Re^3: Generate list with array elements repeated x times
by toolic (Bishop) on Oct 16, 2014 at 20:59 UTC
    You're welcome. I was wondering if there was a way to get rid of your pop/shift, and it turns out you could use splice instead. You determine if this is too clever or not:
    return map { ($_) x 10 } splice @dates, 1, -1;