Understanding perl code

What is the difference between the two statements below?

A:
$a->{"$fruit"}->{"$color"}->{size} = $size

B:
$size = $a->{"$fruit"}->{"$color"}->{size}

Please assist. Thanks!