Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: newbie need help with a simple code

by LanX (Saint)
on Mar 05, 2013 at 01:27 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found