Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
For questions relating to the Raku programming language (formerly known as Perl 6).
7
votes
3
answers
295
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 distinguish them from other numbers in …
2
votes
Perl 6 oneliner to sum up all numbers in a text file
I managed to further compress the answer by @200_success
my regex float { <[+-]>? \d+ [ <[.,]> \d+ ]? }
say [+] slurp.match( / \* <( <float> )> /, :g )».trans(',' => '.');
It is just two lines an …
12
votes
1
answer
190
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 characters from the names of files.
$ cd wor …