{ area_code => 617, zip_code => 02205, dow => 0, tod => 14 } #### foreach my $little_string (split(/\|/,$big_string){ my @little_string_parts = split(/:/,$little_string); $result_hashref->{$little_string_parts[2]} = $little_string_parts[3]; } #### $big_string =~ /special:[0-9]{4}:(.*):(.*)\|special:[0-9]{4}:(.*):(.*)\|special:[0-9]{4}:(.*):(.*)\|special:[0-9]{4}:(.*):(.*)/; $result_hashref->{$1} = $2; $result_hashref->{$3} = $4; $result_hashref->{$5} = $6; $result_hashref->{$7} = $8;