($index = $str) =~ s/\|.*//; $data_hash{$index} = $str; [download]
In reply to Re^2: Removing digits until you see | in a string by MaxKlokan in thread Removing digits until you see | in a string by kevyt