File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ Unicode table.
97
97
98
98
binmode STDOUT, ":encoding(UTF-8)";
99
99
100
- say ''
100
+ say '';
101
101
102
102
__TEST__
103
103
like($code, qr|\\x{[0-9a-f]+?}|i, '\x{} notation should be used');
@@ -131,7 +131,7 @@ B<Hint>: use Unicode B<NOT SIGN>.
131
131
132
132
binmode STDOUT, ":encoding(UTF-8)";
133
133
134
- say ''
134
+ say '';
135
135
136
136
__TEST__
137
137
like($code, qr|\\N{[ A-Z]+?}|, '\N{} notation should be used');
@@ -158,16 +158,22 @@ script as UTF-8 text file. Watch this:
158
158
say "$k note is $v";
159
159
}
160
160
161
- Even more, you can use Unicode symbols in your indentifiers!
161
+ Even more, you can use Unicode symbols in your indentifiers
162
162
163
163
use utf8;
164
164
165
- binmode STDOUT, ":encoding(UTF-8)";
166
-
167
165
my $cliché = 42;
168
166
169
167
say "The answer is $cliché!";
170
168
169
+ and inside regular expressions!
170
+
171
+ use utf8;
172
+
173
+ my $snowman = "Hello, I'm \x{2603}.";
174
+
175
+ say 'Snowman is here!' if $snowman =~ /☃/;
176
+
171
177
=head4 Exercise
172
178
173
179
Edit this piece of code by filling internationalized country code
You can’t perform that action at this time.
0 commit comments