my $all = ; chomp($all); if ($all=~/([^=]+?)\s*=\s*(.*)/) { $hash{$1} = $2; } else { print "Input Error. \n"; $i--; }