Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
This response directs itself to your second question.

Your code passes a syntax check... that is to say, my Perl (5.016) detects no syntax errors.

However, your code suffers from several shortcomings:

  • The "-w" and "use warnings:" are effectively duplicative, in this particular code (ie, where you are not using an external package or module and, thus, where -w's additional effect does NOT propagate to that other code).
  • You are not checking the outcome of your open(...)s. That's a practice that's almost certain to bite you (and, "HARD!").
    1. Instead, you should include a or die "Can't open... $!;" clause that will alert you if your open fails for some reason.
    2. Better yet, use three-argument opens: adopt the above, the use of "<" for read or ">" for writes (BTW, there are other options) and use of a lexical filehandle
      execute perldoc -f open from your OS' command line for details and examples
  • Your "close" commands seems to have fallen out of your code. This, too, can BITE!

Turning to your post, itself:

I know -- off the top of my head -- of at least three diffent ways that the file extension ".pdb" is used -- Palm dbs, C++ debugging, and "Protein Data Bank" data. You really should specify as it's unreasonable to expect the Monks will be able, magicly, to infer which you mean.

And, returning to your second question ("(i)s THIS code is correct...." (sic)) that's easy enough to determine pragmatically: Try it to see. Somehow, I suspect that's not your real question, but, again, you can't expect magic inferences about your actual intent.


In reply to Re: pdb spliting by ww
in thread pdb spliting by abhi4.amity

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (18)
    As of 2014-08-22 14:19 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (158 votes), past polls