Alexander
Recent Actions
-
Commented on Perl Weekly Challenge # 6: Compact Number Ranges
PS1 It seems the assignment issue can be resolved simply by enclosing the list items in parentheses, e.g. like so (1,2,3,4,...9,9). PS2 I meanwhile realized that the remark above about the itemized array was due to the fact that I...
-
Commented on Perl Weekly Challenge # 6: Compact Number Ranges
Dear Laurent, Could it be that the statement "my @input = @*ARGS.elems > 0 ?? @*ARGS !! 1,2,3,4,9,10,14,15,16,3,4,5,6,4,5,6,7,9,9;" does not have the desired effect? When I run it, and the condition of the ternary operator is true, only the "1"...
-
Commented on Perl 6 Colonpairoscopy
That should be: identifiers of the form ordinary_identifier:key<value>?...
-
Commented on Perl 6 Colonpairoscopy
What about extended identifiers per se, e.g. identifiers of the form “ordinary_identifier:key”? Should such identifiers be considered to contain an actual “colon pair”? Or is it better to refer to such an identifier as merely comprising, for instance, a “colon-separated...
Comment Threads
-
laurent_r commented on
Perl Weekly Challenge # 6: Compact Number Ranges
Hi Alexander,
thanks a lot for your comments.
As you stated in your PS in your next comment, you probably used a wrong syntax for calling the program (the arguments need to space-separated), but, still, I agree with you that there is a bug in the "my @input = @*ARGS.elems > 0 ?? @*ARGS !! 1,2,3,4,9,10,14,15,16,3,4,5,6,4,5,6,7,9,9;" syntax. I am sure I tested it at one point, but I must have changed something in it afterward and not tested the change correctly, and I definitely admit that this line does not work properly.
I think it works properly with the following sy…
-
laurent_r commented on
Perl Weekly Challenge # 6: Compact Number Ranges
Concerning your PS3. Yes, there was another bug in my original post . Basically, the issue was that when the last item of compacted list is a range, then it is nor properly processed. And, of course, if there is only one range, such as 222 223 224, it is the last range and is badly processed.
As in the case of the other bug (with the processing of the arguments), I will correct my original post for the benefit of future users, but I fully recognize my errors.
Cheers, Laurent.
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.