How do I split Chinese characters one by one?
Posted
by Nano HE
on Stack Overflow
See other posts from Stack Overflow
or by Nano HE
Published on 2010-04-27T23:34:36Z
Indexed on
2010/04/28
6:13 UTC
Read the original article
Hit count: 175
If there is no special character(such as white space, : etc) between firstname and lastname.
Then how to split the Chinese characters below.
use strict;
use warnings;
use Data::Dumper;
my $fh = \*DATA;
my $fname; # ??;
my $lname; # ? ;
while(my $name = <$fh>)
{
$name =~ ??? ;
print $fname"/n";
print $lname;
}
__DATA__
???
Output
??
?
© Stack Overflow or respective owner