Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
When it gets to an invalid non-UTF8 character the message "Malformed UTF-8 character (byte0xff) in pattern match (m//) ... , but the match does not fail and $& holds the bad characters plus some subsequent bytes. How can I get the match to fail so I can remove the first char in the buffer.use utf8; $read_buf =~ m/^\W/; $utf8_char = $&;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: UTF8 matches
by chromatic (Archbishop) on Aug 22, 2001 at 23:54 UTC | |
by Anonymous Monk on Aug 23, 2001 at 01:48 UTC | |
|
Re: UTF8 matches
by Anonymous Monk on Aug 22, 2001 at 16:31 UTC |