No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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:
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.] -- Ken In reply to Re: avoid writing 'use utf8' in every script
by kcott
|
|