As we just saw, a Perl 6 program can intensively use the Unicode characters outside of the conventional ASCII set. This also applies to the whitespaces. Whitespaces are those gaps between the elements of the program, that are traditionally represented by spaces (ASCII code 0x20), tabs (0x09), and newlines (a single line feed character 0x0A in Unix and a series of two characters, carriage return 0x0D, and line feed 0x0A in Windows). Perl 6 extends the concept of whitespaces and accepts Unicode whitespace in every place of the code where a regular space is allowed. Be careful when you work with an existing code that, for some reason, is filled with Unicode characters.
A whitespace character set in Perl 6 includes characters that have one of the following Unicode properties:
- Zs: Separator, Space
- Zl: Separator, Line
- Zp: Separator, Paragraph
You can find...