$str =~ s/^(\d+)// or die "missing digits in front of $str\n"; $data_hash{$1} = $str;