Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by tmharish (Friar)
on Feb 25, 2013 at 09:54 UTC ( #1020478=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Can't get rid of: Useless use of private variable in void context
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020478]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2015-07-06 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (71 votes), past polls