Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
192 B
4
Indexable
Never
my %hash = ("A"=>1,"B"=>2,"C"=>3,"D"=>4,"E"=>5,"F"=>6);

foreach $key (sort keys %hash){
    $hash{$key} = $hash{$key}**2;
}

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