Programming-Idioms

History of Idiom 2 > diff from v73 to v74

Edit summary for version 74 :
New Perl implementation by user [athenot]

Version 73

2019-09-26, 16:36:29

Version 74

2019-09-26, 16:48:02

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Code
print "Hello\n" x 10;
Comments bubble
Without using a loop, using the repeat operator.
Doc URL
https://perldoc.perl.org/perlop.html#Multiplicative-Operators