in reply to Removing digits until you see | in a string
will give you beginning digits as the index of the hash and rest of the string as the value.$hash{$1} = $2 if ($str =~ /([0-9]+)(.+)/) ;
beginning digits as the index and the whole string as the value of the index.$hash{$1} = $str if ($str =~ /([0-9]+)(.+)/) ;
|
|---|