Questions tagged [perl6]

Perl 6 is the latest version. This tag should be used only for requests that relate to behaviors specific to Perl 6. Scripts that can be run in Perl 5 should just use the perl tag.

Filter by
Sorted by
Tagged with
2
votes
1answer
25 views

Ranges of enum members that dwim

Inspired by this blogpost I decided to try and make it possible to have ranges of enum members that dwim, aka. that contain the actual members and not a stringified ...
6
votes
1answer
39 views

Raku / Perl6: A module to enable escape codes in the win32 console, naming suggestions

I have this little project i am about to release. https://github.com/holli-holzer/perl6-Win-VT I would be happy about a code review and suggestions for a better name. Discussion in IRC yielded ...
6
votes
2answers
75 views

perl6: html color gradient generator

Inspired in this color gradient generator, this is a gradient generator in perl6. I wonder if the code could be simplified or improved. It converts the hex colour to base10, calculates the gradient ...
3
votes
1answer
103 views

Parsing a C++ function declaration with Perl 6 grammar

I wrote a Perl 6 grammar to parse a C++ function. My final goal would be to parse an entire header. The aim is not to correct C++ syntax errors, but to parse valid C++. Do you have some advice or ...
3
votes
0answers
49 views

Correct user typos in a C source file using Perl 6 grammar

To learn about Perl 6 grammars, I created a simple parser for C source files. Note that this is a constructed example motivated by this question. The point is to parse a C source file and correct user ...
10
votes
3answers
135 views

Mass and length calculator using Perl 6 custom operator

I am studying chemistry in the university, and then I try to write all the things in the textbook with Perl6 or Perl, like balancing the chemical formula or other process! Then I encountered the ...
4
votes
1answer
75 views

Get sum of an array in 3 ways, for, while and recursive

So i was trying to find sum of an array using 3 ways in perl6 for while recursive (I know there are inbuilt perl6 functions for this) I want to know if there is a better way to do this or is this ...
5
votes
2answers
84 views

Break an array into n equal or almost-equal sized sublists

I want to break a larger list into $num-lists smaller lists. I thought that there might be an option for rotor that would ...
7
votes
3answers
181 views

Perl 6 oneliner to sum up all numbers in a text file

The task is to sum up scores mentioned in a text file. Scores are floating point numbers as defined by the regexp float immediately preceded by a * character to ...
9
votes
1answer
140 views

Copy directories while changing Unicode filenames to ASCII

I created a short Perl 6 script copyfnameascii.pl to copy a file hierarchy I have, applying an URL Decoding to the names of folders and removing non-ASCII ...