http://www.perlmonks.org?node_id=1020478


in reply to Can't get rid of: Useless use of private variable in void context

Update:

This is about my stupidest post - the long assignments got me totally confused with where each statement begins and ends.

Anon below has hit the nail on the head - I probably need someone to hit me on the head as well!

Please ignore rest of this post.

Original post - Please ignore

Some of your ifs are ; terminated and some assignments might be missing a ; - not sure if you actually want that:

My comments start with '##'

$PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OverallSize'} = 0 if ( not exists $PlaceToPutInformation->{'Memory'}{ +'HIGHTEC'} {'OverallSize'} ); ## If closed here - useless use of ... $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OverallSize'} = $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OverallSize'} + + $3; $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'}{$6} = +0 ## Possible ; missing if ( not exists $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memo +ry'} {$6} ); ## If closed here - useless use of ... $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'}{$6} = $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'}{$6} + +$3; $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OutputSection'} +{$7} = 0 ## Possible ; missing if ( not exists $PlaceToPutInformation->{'Memory'}{'HIGHTEC'} {'OutputSection'}{$7} ); ## If closed here - useless use o +f ... $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OutputSection'} +{$7} = $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OutputSection'} +{$7} + $3;

Cant do better unless there is test input