Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Mean calculation problem

by bobf (Monsignor)
on Jan 13, 2010 at 06:52 UTC ( #817118=note: print w/ replies, xml ) Need Help??

in reply to Mean calculation problem

I got stuck in the regex

I would suggest starting with CPAN rather than writing your own parser. Bio::Structure::IO, Chemistry::File::PDB, Chemistry::Mol all look relevant, and there are likely several more. If you use an existing module to do the low-level work, you can focus on the real reason you are writing the code (i.e., it isn't because you want to parse a PDB file, it is because you want to do something with the contents of the file).

If you insist on rolling your own parser, look at unpack. It is great for fixed-width data, and will likely be much faster and less buggy than any regex you assemble.


Comment on Re: Mean calculation problem

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2015-12-01 13:04 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (10 votes), past polls