in reply to Generate list with array elements repeated x times
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; sub date_list { my @mults =qw( 2010-01-01 2010-01-02 2010-01-03 ); return map { ($_) x 10 } @mults; # <--- HERE } say for date_list('2014-01-01', '2014-01-10');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Generate list with array elements repeated x times
by Anonymous Monk on Oct 16, 2014 at 20:47 UTC | |
by choroba (Cardinal) on Oct 16, 2014 at 21:07 UTC |