Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
233 B
3
Indexable
Never
my %hash;

foreach my $line ( <STDIN> ) {
    chomp( $line );
    my @tokens = split('=', $line);
    # split string by '='
    $hash{$tokens[0]} = $tokens[1] 
}

foreach $key (sort keys %hash){
    print"$key=", $hash{$key}, "\n";
}