- or download this
perl -MData::Dumper -we "while(my $k=shift @ARGV and $v = shift @ARGV
+){$h{$k}=$v};print Dumper \
...
'2' => 'b'
};
- or download this
perl -MData::Dumper -we "my $k; while($k=shift @ARGV and $v = shift @A
+RGV ){$h{$k}=$v};$h{$k}= undef unless exists $h{$k}; print Dumper \%h
+ " 1 a 2 b ODD
...
'2' => 'b'
};
- or download this
perl -MData::Dumper -e "while($k=shift @ARGV and $v = shift @ARGV ){$h
+{$k}=$v};if($k and !$v){$h{$k}=undef}print Dumper \%h " 1 a 2 b ODD
...
'ODD' => undef,
'2' => 'b'
};