Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Unfortunately, the code you've posted here does not compile. As far as I can tell, you've got an elsif followed by an else, followed by another elsif. Perhaps you have a closing curly and else missing on the outer if, but it's really hard for me to tell where because the code you've posted is also 256 lines long.

In order to get the most efficient help possible, please first fix your code so that it at least compiles. Also, you should always Use strict and warnings, since that will help you avoid other mistakes. And I recommend you use perltidy to format your code so that the indentation is better, this will also help you spot issues like missing braces much faster. If you follow all of this advice, we will very likely be able to help you quite quickly. In addition, providing some short but representative sample input with the expected output for that input would be very helpful. "Representative" in this case means especially that each branch of your multiple if-elsif-elses should be exercised by the sample input. See also SSCCE.

Another thing that will shorten your code significantly is if you take the many, many lines that look like $worksheet2->write($rowCount2+1, 1, $t[1]); and turn them into a loop, such as $worksheet2->write($rowCount2+1, $_, $t[$_]) for 1..11;. I see that in each case you're replacing a different element with something from @ary, which is something you could probably also do by assigning to the appropriate element of @t before that loop - due to the length of the code it's a little difficult for me to tell if that works with all of your logic, but in the worst case you could always just make a temporary copy of @t and modify that.

In reply to Re: bug or curly bracket hell? by haukex
in thread bug or curly bracket hell? by MoodyDreams999

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2023-11-30 04:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found