G'day reqnode,
What you really want may be possible; however, what you describe is illegal syntax.
Consider this example script (see Note below):
#!/usr/bin/env perl
use utf8;
sub smiley {
print "Smiley\n";
}
sub ☺ {
print "Smiley\n";
}
Here's what happens when you run this:
$ pm_script_with_utf8.pl
Illegal declaration of anonymous subroutine at ./pm_script_with_utf8.p
+l line 9.
The documentation for the utf8 pragma even tells you this:
"One can have Unicode in identifier names, but not in package/class or subroutine names."
If you provide a short code example, that might serve to illustrate exactly what you're trying to achieve.
[Note: I've used <pre>, instead of <code>, tags for the code containing Unicode characters.
This is to allow the actual characters, instead of character entity references, to be displayed.
Please do the same with any such code you post.]
|