- or download this
use strict;
use warnings;
use Data::Dumper;
my %hash = map { split; $_[1] => $_[0] } "value key", "meaning-of-life
+ 42";
print Dumper( \%hash );
- or download this
Use of implicit split to @_ is deprecated at dent.pl line 4.
$VAR1 = {
'42' => 'meaning-of-life',
'key' => 'value'
};
- or download this
Useless use of split in void context at dent.pl line 4.
Use of uninitialized value in list assignment at dent.pl line 4.
...
$VAR1 = {
'' => undef
};
- or download this
use strict;
use warnings;
use Data::Dumper;
my %hash = map { (split)[1,0] } "value key", "meaning-of-life 42";
print Dumper( \%hash );