http://www.perlmonks.org?node_id=863137

westrock2000 has asked for the wisdom of the Perl Monks concerning the following question:

I would like to use printf, but would also like to print a character multiple times. I cannot figure out the syntax

I have figured out you can do something like
printf ("%c" x 3,65,66,67);
Which will print ABC
But I what I would like to be able to do is something like AABBBCCCC

Normal print would just be as follows, but the commas throw me for a loop when it comes to printf.
$a = chr(65); $b = chr(66); $c = chr(67); print ($a x 2, $b x 3, $c x 4);
Thanks