Elegance, of course, is in the eye of the beholder.
my $init = 1; my $step = 4; my $count = 5; + my $string = join ' ' => map { $_ * $step - ($step - $init) } 1 .. $count;
If your code works, there's nothing wrong with it.
Cheers,
Ovid
New address of my CGI Course.
In reply to Re: String manipulation
by Ovid
in thread String manipulation
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |