Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I hit the "approve" button for this post, but I was really tempted not to. Posting a bunch of badly formatted code with no explanation is unlikely to lead to helpful responses.

I'm not about the run the code as posted. I might bring it up in emacs just to fix the indentation and see if there's anything to say just from looking at it.

So, do you have a particular problem with the code as posted? If so, what is the problem?

UPDATE: In trying to fix the indentation, I noticed that you have an extra close-curly-bracket on the line just preceding this one:

for(1..$npids){
There might be other things wrong, of course, but if you don't say what those other things are, we're not likely to guess them.

Another update: I took the time to run "perl -cw" on the script (after removing that extra close-bracket), and found that you need to include a semicolon (';') after the close-curly-bracket that immediately precedes this line:

close($foundipFILE);
That's because the close-bracket preceding that line is actually the end of an eval block, which makes it different from the close-bracket of an if, while, or for block. Also, taken as-is (without use strict;), it compiles but there's a warning about a variable called out that appears only once: it appears to be a hash that gets values assigned to keys, but then is never used.

As expected, if I add use strict; it won't compile -- there are 8 variables being used without being explicitly declared. Let us know if you'd like some help.


In reply to Re: whats ronge in this by graff
in thread whats ronge in this by lollolbadr

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 learning in the Monastery: (5)
As of 2024-04-25 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found