Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Match full utf-8 characters

by hdb (Monsignor)
on Apr 29, 2019 at 12:38 UTC ( #1233109=note: print w/replies, xml ) Need Help??


in reply to Match full utf-8 characters

This is a workaround but should remove all non 255-ASCII characters:

use strict; use warnings; use utf8; my $str = 'ab'; $str =~ s/(.)/ord($1)<256?$1:''/ge; print "$str\n";

Replies are listed 'Best First'.
Re^2: Match full utf-8 characters
by Allasso (Monk) on Apr 29, 2019 at 13:40 UTC
    This works if $str is implicitly provided in the script, but not when it is read from stdin.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1233109]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2021-04-16 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?