Re: help parsing file

2002-12-18 Thread Pedro Antonio Reche
John W. Krahn wrote: Pedro Antonio Reche wrote: Hi, I am interested in parsing the file at the bottom of this e-mail in order to extract the string between following /product=, /protein_id=, /db_xref= and /translation=, and that for each of the segment separated by the string CDS.

RE: help parsing file

2002-12-18 Thread Bob Showalter
-Original Message- From: Pedro Antonio Reche [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 7:22 PM To: [EMAIL PROTECTED] Subject: help parsing file ... I am not please with it, as it generates an empty element in the hash from the header of the file John Krahn's

Re: help parsing file

2002-12-18 Thread Pedro Antonio Reche
Bob Showalter wrote: -Original Message- From: Pedro Antonio Reche [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 7:22 PM To: [EMAIL PROTECTED] Subject: help parsing file ... I am not please with it, as it generates an empty element in the hash from the

Re: help parsing file

2002-12-17 Thread John W. Krahn
Pedro Antonio Reche wrote: Hi, I am interested in parsing the file at the bottom of this e-mail in order to extract the string between following /product=, /protein_id=, /db_xref= and /translation=, and that for each of the segment separated by the string CDS. The ouptput for the example

RE: help parsing file

2002-04-22 Thread Bob Showalter
-Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 5:37 PM To: [EMAIL PROTECTED] Subject: Re: help parsing file On Friday, April 19, 2002, at 02:17 , Bob Showalter wrote: [..] On Friday, April 19, 2002, at 12:29 , Pedro A Reche Gallardo

RE: help parsing file

2002-04-22 Thread Jackson, Harry
-Original Message- From: drieux [mailto:[EMAIL PROTECTED]] speaking of which - how DO we improve the quality of the problem specs - both amongst beginners and 'product managers' - the former at least seem open to learning while the latter. For the former is there an acceptable use

Help Helpers Help You - was Re: help parsing file

2002-04-22 Thread drieux
On Monday, April 22, 2002, at 08:23 , Jackson, Harry wrote: -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] speaking of which - how DO we improve the quality of the problem specs - both amongst beginners and 'product managers' - the former at least seem open to learning

Re: help parsing file

2002-04-22 Thread drieux
On Monday, April 22, 2002, at 10:01 , Timothy Johnson wrote: Funny you should mention it. My product manager just requested blood from a stone two weeks ago. Now he's threatening to outsource it... warning to those new to perl - DO NOT TRY THIS. These are Paid Professionals Using the

RE: help parsing file

2002-04-19 Thread Timothy Johnson
You could try a variation of this: use strict; open(OUTFILE,parse.log); open(INFILE,myfile.txt); while(INFILE){ if($_ =~ /^/){ #If it starts with $_ .= INFILE; #add the next line to $_ print OUTFILE $_; #and print it. } } -Original Message- From:

Re: help parsing file

2002-04-19 Thread drieux
On Friday, April 19, 2002, at 12:29 , Pedro A Reche Gallardo wrote: HI, I have a file that it could be devided in set of lines, each set startingi with a line that has the symbol. Of everyset of lines, I am trying to print only the line that contain the symbol and the next line. Please

Re: help parsing file

2002-04-19 Thread Pedro A Reche Gallardo
Hi Drieux, thanks a lot for the help. Your program is working very well. My best wishes for you. Pedro *** PEDRO A. RECHE , pHDTL: 617 632 3824 Dana-Farber Cancer Institute, FX: 617 632 4569 Harvard Medical School,

RE: help parsing file

2002-04-19 Thread Bob Showalter
-Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 4:55 PM To: [EMAIL PROTECTED] Subject: Re: help parsing file On Friday, April 19, 2002, at 12:29 , Pedro A Reche Gallardo wrote: HI, I have a file that it could be devided in set

RE: help parsing file

2002-04-19 Thread Timothy Johnson
]' Subject: RE: help parsing file -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 4:55 PM To: [EMAIL PROTECTED] Subject: Re: help parsing file On Friday, April 19, 2002, at 12:29 , Pedro A Reche Gallardo wrote: HI, I have a file

Re: help parsing file

2002-04-19 Thread drieux
On Friday, April 19, 2002, at 02:17 , Bob Showalter wrote: [..] On Friday, April 19, 2002, at 12:29 , Pedro A Reche Gallardo wrote: I am trying to print only the line that contain the symbol and the next line. Bob, I will defer to Pedro on this - my reading had been that given

Re: help parsing file

2002-04-19 Thread drieux
On Friday, April 19, 2002, at 02:13 , Timothy Johnson wrote: In that case, you could always change ### my $nextLine = FH; to ###my $nextLine = FH unless $nextline =~ /^$prefix/; Contract negotiable I'm actually having problems getting that to work... File

RE: help parsing file

2002-04-19 Thread Timothy Johnson
Actually, yeah, spoke too soon. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 2:52 PM To: [EMAIL PROTECTED] Subject: Re: help parsing file On Friday, April 19, 2002, at 02:13 , Timothy Johnson wrote: In that case, you could always change

Re: help parsing file

2002-04-19 Thread Jeff 'japhy' Pinyan
On Apr 19, drieux said: ### while(FH) { ### if( /^$prefix/ ) { ### print $_; ### my $nextLine = $_; ### while ( $nextLine =~ /^$prefix/ ){ ### $nextLine = FH; ### print $nextLine; ### } ### } ### } # end while I would follow this

Re: help parsing file

2002-04-19 Thread John W. Krahn
Timothy Johnson wrote: In that case, you could always change ###my $nextLine = FH; to ###my $nextLine = FH unless $nextline =~ /^$prefix/; That won't work because the $nextLine in $nextLine =~ /^$prefix/ is a global variable and the $nextLine in my $nextLine =

Re: help parsing file

2002-04-19 Thread drieux
On Friday, April 19, 2002, at 03:09 , Jeff 'japhy' Pinyan wrote: [..] First, I'd use a regex trick of //g in scalar context, and /^/m. while (FH) { next unless /^$prefix/; $_ .= FH while /^$prefix/gm; print; } I'm not sure I understand the 'exit' strategy here. assume the

Re: B/C - Re: help parsing file (fwd)

2002-04-19 Thread Jeff 'japhy' Pinyan
-- Forwarded message -- Date: Fri, 19 Apr 2002 19:06:30 -0400 (EDT) From: Jeff 'japhy' Pinyan [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: drieux [EMAIL PROTECTED] Subject: Re: B/C - Re: help parsing file On Apr 19, drieux said: while (FH) { next unless /^$prefix