Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 cooling their heels in the Monastery: (10)
As of 2014-12-22 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (132 votes), past polls