1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
bernhard$ cat t.pl
use strict;
use warnings;
use Data::Dumper;
my %hash = (
- KeyMinus => 'ValueMinus',
+ KeyPlus => 'ValuePlus',
);
print Dumper(\%hash);
bernhard$ perl t.pl
$VAR1 = {
'KeyPlus' => 'ValuePlus',
'-KeyMinus' => 'ValueMinus'
};
QuoteThe => operator (sometimes pronounced "fat comma") is a synonym for the comma except that it causes a word on its left to be interpreted as a string if it begins with a letter or underscore and is composed only of letters, digits and underscores.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ cat t.pl
use strict;
use warnings;
use feature qw(say);
use Data::Dumper;
say - FOO;
say - - BAR;
say - + BLUBBER;
my %hash = (
- - HHH, 'value',
);
print Dumper(\%hash);
$ perl t.pl
-FOO
+BAR
-BLUBBER
$VAR1 = {
'+HHH' => 'value'
};