in reply to quotation mark as key
First off, if you are using a hash reference, you need braces, not parentheses:
my $hash = { foo => 'bar', };
There are several approaches you can use.
Use single quotes for a double quote:
my $hash = { '"' => 1, };
Quote the double quote:
my $hash = { "\"" => 1, };
Use chr:
my $hash = { chr(34) => 1, };
Use alternative quotes:/p>
my $hash = { q(") => 1, };
|
|---|