and I got these errors (the hex values change) when I added the switch/case.use Switch; use XML::Simple; ... my $xml = XMLin("file"); my $foo = $xml; # the xml is <foo>combo</foo> print "$foo\n"; # prints the correct value switch ($foo) { case /combo/ { print "found a combo\n"; } }
I tried turning on and off utf8, but it didn't help. What do I need to do?Malformed UTF-8 character (unexpected continuation byte 0x9c, with no +preceding start byte) in bitwise and (&) at C:/Perl/lib/Switch.pm line 257. Malformed UTF-8 character (unexpected continuation byte 0x90, with no +preceding start byte) in bitwise and (&) at C:/Perl/lib/Switch.pm line 257. Malformed UTF-8 character (unexpected continuation byte 0x92, with no +preceding start byte) in bitwise and (&) at C:/Perl/lib/Switch.pm line 257. Malformed UTF-8 character (unexpected continuation byte 0x9d, with no +preceding start byte) in bitwise and (&) at C:/Perl/lib/Switch.pm line 257. Malformed UTF-8 character (unexpected continuation byte 0x90, with no +preceding start byte) in bitwise and (&) at C:/Perl/lib/Switch.pm line 257.
Thanks, --traveler
In reply to XML::Simple, Switch and UTF8 errors by traveler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |