Per Larsson am Dienstag, 9. Mai 2006 17.50: > Thank you, that solved the problem, but only partly I'm afraid. Problem > is that the lines need to be formatted in a certain way, so that one > line looks exactly like this: > ATOM 1 N ALA 1 41.744 64.901 30.842 1.00 47.38 > 2CDV 83 > > Is there a way to combine the code below with format specifiers to > produce the above text?
Of course... If you mean by "looks exactly like this" a fixformat record (fields starting at defined positions), you can adapt Chas' first parsing solution (leading to @fields) with sprintf or perl formats, see perldoc -f sprintf perldoc perlform You would need a more exact specification of the target format (alignment, starting columns) than provided above. Dani [...] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>