pax77 has asked for the wisdom of the Perl Monks concerning the following question:
But if I read in the hex value from the data file they are different :(:my $a = $cfg{'default.player'}; my $b = "\xeb\xa6\xac\xec\x9e\x91"; if ($a eq $b) { print "indahouse\n"; }
The dumper output for $name is: $VAR1 = '\\xeb\\xa6\\xac\\xec\\x9e\\x91'; so it is not recogniced as hex value. I can't find how to convert this string :( Any help appreciated! Regards, pax77open(ST, "<", $details) or die "Could not read $details: $!\n"; while (<ST>) { if (/m_name/) { if (/([\\\w]*)',$/) { $name = $1; print Dumper($name); if ($name eq $cfg{'default.player'}) { print "indahouse\n"; } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing string hex / korean
by choroba (Cardinal) on Jan 04, 2019 at 14:37 UTC | |
|
Re: Comparing string hex / korean (updated)
by haukex (Archbishop) on Jan 04, 2019 at 14:38 UTC | |
|
Re: Comparing string hex / korean
by BillKSmith (Monsignor) on Jan 04, 2019 at 15:53 UTC | |
|
Re: Comparing string hex / korean
by daxim (Curate) on Jan 04, 2019 at 16:16 UTC |