|Perl: the Markov chain saw|
Is there a Perl5 module on CPAN that provides a function analogous to the Perl6 list-repeat operator?by molecules (Monk)
|on Aug 11, 2010 at 15:11 UTC||Need Help??|
molecules has asked for the
wisdom of the Perl Monks concerning the following question:
I just wanted to know before I decided to create one. I tried searching but haven't found one.
In Perl6 the operator xx will create a list of any number of items that you would like. For example:
is the same as
You can achieve the same thing in Perl5 using x (thanks kennethk and ikegami):
I previously thought that x only created strings.