in reply to Re: Removing digits until you see | in a string
in thread Removing digits until you see | in a string
The same, but one line shorter :-)
($index = $str) =~ s/\|.*//; $data_hash{$index} = $str;
In Section
Seekers of Perl Wisdom