This seems to be something very basic that I don't understand here. Why doesn't "babc" match / a * / ?
In P5, I am able to do something like thismy ($var1, $var2, $var3) = $string =~ /(.+)/s(.+)/s(.+)/;How do I do the same in Perl 6? If I do the same syntax, the $var1 will hold the entire $string value.
I'm rewriting my P5 socket server in P6 using IO::Socket::Async, but the data received got truncated 1 character at the end and that 1 character is received on the next connection. Someone from Perl6 Facebook group (Jonathan Worthington) pointed that this might be due to the nature of strings and...
I would like to convert the following from perl5 to perl6,It create a string of 16 characters where each character has a randomly picked value from 0 to 255. Perl5 doesn't assign any semantics to those characters, so they could be bytes, Unicode Code Points, or something else.
In Perl 5 one can easily simulate script running at specific timestamp:And this works globally - every package, every method, everything that uses time() will see 1545667200 timestamp. Which is very convenient for testing time sensitive logic.
I want to print the current time every second, and also want to sleep 10 seconds very 5 seconds:the output is not what i wanted:
I'd like to make a user-defined character class of "vowels", which will match any literal English vowel letter (a, e, i, o, u) as well as any of these letters with any possible diacritics: ắ ḗ ú̱ å ų̄ ẹ́ etc.
I am looking for a simple solution to protect my routes with the Basic Authentication mechanism with Cro. In my example I'd like to see a 401 Unauthorized if you don't provide any credentials at all. If you provide wrong credentials I like to see a 403 Forbidden
I know it is possible to invoke Java when Perl 6 is using that backend: How do I invoke a Java method from perl6
Perl 5 has the encoding pragma or the Filter::Encoding module, however, I have not found anything similar in Perl 6. I guess eventually source filters will be created, but for the time being, can you use other encodings in Perl 6 scripts?