Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
$y, $z)=/^.{27}(.{8})(.{8})(.{8})/o; > } > > joe > > > > On 5/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > - Original Message - > > > From: Aditi Gupta <[EMAIL PROTECTED]> > > > Date: Monday, May 9, 2005 11:41 am > > > Su

Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
$y, $z)=/^.{27}(.{8})(.{8})(.{8})/o; > } > > joe > > > > On 5/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > - Original Message - > > > From: Aditi Gupta <[EMAIL PROTECTED]> > > > Date: Monday, May 9, 2005 11:41 am > > > Su

Re: extracting coordinates

2005-05-09 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: "Aditi Gupta" <[EMAIL PROTECTED]>; Sent: Monday, May 09, 2005 5:06 PM Subject: Re: extracting coordinates - Original Message - From: "Aditi Gupta" <[EMAIL PROTECTED]> To: Sent:

Re: extracting coordinates

2005-05-09 Thread perlocean
- Original Message - From: "Aditi Gupta" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Monday, May 09, 2005 11:52 AM Subject: Re: extracting coordinates hi, the fields can not be splitted using /s because some fields have common boundaries, i.e. some fields

Re: extracting coordinates

2005-05-09 Thread perlocean
- Original Message - From: "Aditi Gupta" <[EMAIL PROTECTED]> To: Sent: Monday, May 09, 2005 10:41 AM Subject: extracting coordinates Hi everyone, while(){ my @fields = split /\s/; if (/([-]\d{1,2}\.\d{2,3})\s([-]\d{1,2}\.\d{2,3})\s(\d{1,2}\.\d{2,3})/ and $fields[2] eq

Re: extracting coordinates

2005-05-09 Thread mgoland
- Original Message - From: Aditi Gupta <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 12:52 pm Subject: Re: extracting coordinates > hi, Hello, > the fields can not be splitted using /s because some fields have > common > boundaries, i.e. some fields are from co

Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
Record name "ATOM " 7 - 11 Integer serial Atom serial number. these are the 1st two fields. On 5/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > - Original Message - > From: Aditi Gupta <[EMAIL PROTECTED]> > Date: Monday, Ma

Re: extracting coordinates

2005-05-09 Thread mgoland
- Original Message - From: Aditi Gupta <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 11:41 am Subject: extracting coordinates > Hi everyone, Hello Aditi, > > That code is working... > But my specific problem is as follows: > > i have a file in which data is

Re: extracting coordinates

2005-05-09 Thread Philip M. Gollucci
Aditi Gupta wrote: if(my $line =~ /^/$a/\s* (\s*\d+) \s*/$c/\s* \d* \w+ \s \w (\s*\d+) \w* (\s*\d*) (\s*\d*) (\s*\d*) (\s*\d*) (\s*\d*) (\w*\s*) (\s*\w*) (\s*\w*)/) Couple things: perldoc perlre perldoc perlop /^/$a/\s* you're not doing a subsitution, you have too many / /^$a\s*

extracting coordinates

2005-05-09 Thread Aditi Gupta
Hi everyone, That code is working... But my specific problem is as follows: i have a file in which data is stored as HELIX 4 4 VAL 74 LEU 84 1 11 CRYST1 33.020 33.750 75.670 90.00 90.00 90.00 P 21 21 21 4 ORIGX1 1.00 0.00 0.00 0.0 ORIGX2 0.00 1.00 0.00 0.0 OR