- or download this
#!/usr/bin/perl -w
use strict;
...
<\">
<'"'>
- or download this
my $hexstr = "0x" . unpack("H*", $barestr);
$dbh->do(qq{insert into test_chars values( $hexstr )});
# notice that the hexstring has NO QUOTES
- or download this
mysql> select * from test_chars;
+-------+
...
| '"' |
+-------+
9 rows in set (0.00 sec)
- or download this
#
# Dumping data for table 'test_chars'
...
INSERT INTO test_chars VALUES ('\"');
INSERT INTO test_chars VALUES ('\\\"');
INSERT INTO test_chars VALUES ('\'\"\'');
- or download this
_ _ _ _
(_|| | |(_|><
_|