![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re: How can i print N repeated characters?by lithron (Chaplain) |
on Mar 10, 2006 at 15:37 UTC ( #535726=note: print w/replies, xml ) | Need Help?? |
for (1..5) { print "-"; }
Which prints the ----- you are looking for. If you want to print the number of the iteration you could use: for my $x (0..9) { print $x; } Which outputs 0123456789
In Section
Seekers of Perl Wisdom
|
|