print a same line several times in perl

perl

Solution

for (1 .. $how_many) { print "$foo\t" x 99, "$bar\n"; }

is IMO simpler than C-style for (;;) loops.

Problem

I want to output in one line which is fine now, like: ``` print "$a\t" x 99; print "$b\n"; ``` So above is how one line looks like. But I also want to print these lines `$c` times. Is there a shortcut to do that rather than using for loops like: ``` for ($i = 1; $i <= $c; $i++) { print "$a\t" x 99; print "$b\n"; } ``` Is there simpler ways to do so, just like `"$a\t" x 99`?

Original source