in reply to Building an array, "stripes on a wall"
Just another way to do it:
my $wall_height = shift || 50; my $stripe = shift || 11; my @stripes = grep { $_ % $stripe == 0 } 1 .. $wall_height; print "@stripes\n";
If perchance you don't want a stripe painted on the very top course of your wall, just change
1 .. $wall_height to 1 .. $wall_height - 1
|
---|
In Section
Seekers of Perl Wisdom