- or download this
%hash = map {$_ => 1} <DATA>;
print for (sort keys %hash);
...
B=world
B=planet
C=universe
- or download this
A=hello
B=planet
B=world
C=universe
- or download this
A=hello
B=planet
C=universe
- or download this
use strict;
my %hash = map {/^(.*)=/ or die "Malformed input: $_"; $1 => $_} <DATA
+>;
...
B=world
B=planet
C=universe