This is close to what you said, but made it one liner:
use strict; use warnings; my $str = "cat"; print join("", map {$_ x (1 + rand(3))} split //, $str);
In reply to Re: Function over all letters in a string
by pg
in thread Function over all letters in a string
by Jobby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |