Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by Anonymous Monk
on Feb 25, 2013 at 10:35 UTC ( #1020491=note: print w/ replies, xml ) Need Help??


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

sadly I still got to use perl 5.10 so local *HTEC... is not working

Sure it is, it worked since the very first perl5, at least

perl -MData::Dump -e" dd $f={2,{4,{6,8}}}; local *H=$$f{2}{4}; dd\%H" { 2 => { 4 => { 6 => 8 } } } { 6 => 8 }


Comment on Re^3: Can't get rid of: Useless use of private variable in void context
Download Code
Re^4: Can't get rid of: Useless use of private variable in void context
by tobias_hofer (Friar) on Feb 25, 2013 at 11:28 UTC
    Hey, you are right! :-)
    Perfect!

    But there is one thing, I have to remove the  use strict;
    else I get a:
    Global symbol "%HTEC" requires explicit package name at...

    Thanks a lot!
    Tobias

      There may be some case where removing "use strict; is a valid approach, but if so, I'm having a hard time thinking of it (not that I tried very hard -- because strict is your friend). Put it back in and find out how to make the hash "legal" (perhaps by declaring it with "my").


      If you didn't program your executable by toggling in binary, it wasn't really programming!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2014-12-29 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (184 votes), past polls