Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl script that will read two pdb files with different line numbers and will replace the chain letter from the first to the second file

by hippo (Bishop)
on Jun 22, 2018 at 10:18 UTC ( [id://1217178]=note: print w/replies, xml ) Need Help??


in reply to Perl script that will read two pdb files with different line numbers and will replace the chain letter from the first to the second file

if ($resnum1=$resnum)

Inside the brackets is an assignment. You almost certainly don't want to do that but instead test equality. ie:

if ($resnum1 == $resnum)

== is for comparing numbers and eq is for comparing strings.

Is there any particular reason you use those massive regexes in preference to a simple split? That might make things a little clearer. Other tips: use strict and warnings, replace print ... exit with die and try to use consistent indenting to make your code more legible (this really does help).

Good luck.

  • Comment on Re: Perl script that will read two pdb files with different line numbers and will replace the chain letter from the first to the second file
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-18 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found