my %hash; foreach (@ARGV) { $_ =~ m/^(.*?)=(.*)$/; $hash{$1} = $2; } #### my %hash = map{m/^(.*?)=(.*)$/;$1=>$2} @ARGV;