mattoates
Recent Actions
-
Commented on Reconsidering Exercise 1
My times for the Perl 5 version for comparison: real 0m0.064s user 0m0.010s sys 0m0.015s So my Mac has a slower time for the Perl 5 code so I'd imagine the OP would have a slightly better time than 1s...
-
Commented on Reconsidering Exercise 1
Just did the Perl 6 example on my Macbook Air and got a very different time! I have a feeling the poster is using the JVM build without understanding that it has about ~8 seconds start up time regardless of...
Comment Threads
-
Timo Paulssen commented on
Reconsidering Exercise 1
Do note that you can use @*ARGS instead of providing a sub MAIN; though the latter will give you a usage message when you don't supply the max and if you write
sub MAIN( Int $max = 1000 )
instead, you'll even get a helpful error message if the user writes "over nine thousand" instead of a number.Also, for interpolating arrays into strings, you can also just write
"My multiples are: @multiples[]".say;
And another thing: I think "1 ..^ $max" looks prettier than "1 .. $max-1".
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.