Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: newbie need help with a simple code

by LanX (Canon)
on Mar 05, 2013 at 01:27 UTC ( #1021731=note: print w/ replies, xml ) Need Help??


in reply to newbie need help with a simple code

unclear, do you need certain columns or certain rows?

using split should help in both cases

DB<108> $line='ATOM 1287 O LYS B 65 49.675 57.571 62.721 1.00 31.87 +O' => "ATOM 1287 O LYS B 65 49.675 57.571 62.721 1.00 31.87 O" DB<109> @col =split / /,$line => ( "ATOM", 1287, "O", "LYS", "B", 65, "49.675", "57.571", "62.721", "1.00", "31.87", "O", ) DB<110> @col[1..3,5] => (1287, "O", "LYS", 65)

Cheers Rolf


Comment on Re: newbie need help with a simple code
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-07-30 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (241 votes), past polls