Declaring an array with incremental values in Perl
arrays, perl, shortcut
Solution
my @array = map 5*$_, 1..5;
and
my @array = map 100*$_, 1..5;
Problem
I know it's possible to declare an array like this: ``` my @array = ( 5 .. 10 ); ``` which is equivalent to: ``` my @array = ( 5, 6, 7, 8, 9, 10 ); ``` but is there a similar shorthand when the incremental value is greater than one e.g. ``` my @array = ( 5, 10, 15, 20, 25 ); my @array = ( 100, 200, 300, 400, 500 ); ```