Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
We don't bite newbies here... much
 
PerlMonks  

Re: Re: "Useless use of private variable in void context"

by Seumas (Curate)
on Jun 20, 2003 at 21:35 UTC ( #267719=note: print w/ replies, xml ) Need Help??


in reply to Re: "Useless use of private variable in void context"
in thread "Useless use of private variable in void context"

I don't seem to get the same error if I run it in a test script by itself, either. But if I remove the line in question, I do get an error - just later in the script (the next chunk of code, which is an eval{} but in which I can find no problem either).

As for the ampersand - I have been conflicted over this. At one point I had read that there was a difference between calling a sub naked and calling it with an ampersand prefixed to it. I believe that it stated you should use an ampersand if you expected something to be returned (or to make the sub return to its calling point no matter what?). But I have since been told by a couple of people that the rule of the ampersand is obsolete (or more accurately, was documented but then never implemented).

I do it out of habit now, though I'm trying to break it!

I guess I just needed some people smarter than myself to assure me that the snippet of code and how it was being accessed wasn't really the problem. (I assumed it was not, since I coudl run it by itself). Now I know that focusing on that bit is a waste of time and can look toward the rest of the sub for the culprit. It's a huge sub, but it's syntatically quite clean. I still am sure it'll end up being a simple oversight somewhere that I'll slap my forehead over though. I'll update here when I reach the conclusion.


Comment on Re: Re: "Useless use of private variable in void context"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (16)
As of 2014-04-17 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls