Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-03-29 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found