my %hash; for(@ARGV) { my($key,$val) = split/=/,$_,2; $hash{$key}=$val; } use Data::Dumper; print Dumper(\%hash); __END__ Output: $VAR1 = { 'vchtyp' => 'I', 'jrnltyp' => 'D', 'title' => '\'this is a title\'', 'lexwhere' => '\'in(\'DIS\', \'DIM\', \'DIR\')\'' }; (Data::Dumper is inserting those extraneous backslashes, ignore them)