rasto@frodo:~/cheat$ ./test.pl 'r,2,g,2,w,1,q,1' $VAR1 = {}; %badhash: $VAR1 = { 'r,2,g,2,w,1' => undef }; Can't find string terminator "," anywhere before EOF at (eval 1) line 1. %hash: $VAR1 = { 'w' => 1, 'r' => 2, 'g' => 2 }; passing through qw: $VAR1 = { 'w' => '1', 'r' => '2', 'g' => '2' };