That's a very convoluted way of achieving something that's already done for you:
I.e. if IO::Handle is loaded, STDIN is already an object resembling IO::Handle and you can call getc method on it.$ perl -E'say STDIN->can("getc")' $ perl -MIO::Handle -E'say STDIN->can("getc")' CODE(0x55dddd02b150)
But for the sake of the exercise, you should be able to pass "<:utf8" instead of "r" to fdopen and have getc return Unicode characterscode points again. (untested)
In reply to Re^4: Match full utf-8 characters
by Anonymous Monk
in thread Match full utf-8 characters
by Allasso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |