in reply to Printing a UTF8 code

Since it hasn't been mentioned yet, note that \u in Perl actually means "titlecase the next character" (I assume you got \u from JS) - see Quote and Quote like Operators. You're looking for either \xB9 (two hexadecimal digits only), \x{00B9}, \N{U+00B9}, or \N{SUPERSCRIPT ONE} (on older versions of Perl charnames needs to be loaded for the last one to work), or of course adding use utf8; to the script, saving it as UTF-8, and using a literal ¹ character. Also, I'd suggest having a look at "open" Best Practices.