Output of the above script it.... Package A VAR=2 Package B VAR=3 Package C VAR=4 Package Main VAR=5 Package Main VAR=4