Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
hi john, thanks a lot!! the code worked...:-) On 5/9/05, John Doe <[EMAIL PROTECTED]> wrote: > > Am Montag, 9. Mai 2005 18.52 schrieb Aditi Gupta: > > hi, > > the fields can not be splitted using /s because some fields have common > > boundaries, i.e. some fields are from column 31-38 and the n

Re: extracting coordinates

2005-05-09 Thread Aditi Gupta
hi john, thanks a lot!! the code worked...:-) On 5/9/05, John Doe <[EMAIL PROTECTED]> wrote: > > Am Montag, 9. Mai 2005 18.52 schrieb Aditi Gupta: > > hi, > > the fields can not be splitted using /s because some fields have common > > boundaries, i.e. some fields are from column 31-38 and the n

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 "CA"){ print "$1,

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
hi, the fields can not be splitted using /s because some fields have common boundaries, i.e. some fields are from column 31-38 and the next field starts from 39.. As in COLUMNS DATA TYPE FIELD DEFINITION - 1 - 6 Re

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 stored as > > HELIX 4 4 V

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*