Re: Data file with records that span two lines

2010-01-22 Thread Perl Noob
> On 1/20/2010 8:28 PM, Perl Noob wrote: >> You can tell from my initial request that I have some knowledge. An >> expert? No. But not an novice either. I had no real knowledge of >> the >> <> until it was introduced to me on this list. I did find out what >> it >> did, and incorporated it int

Re: Data file with records that span two lines

2010-01-22 Thread Brad Baxter
On 1/20/2010 8:28 PM, Perl Noob wrote: You can tell from my initial request that I have some knowledge. An expert? No. But not an novice either. I had no real knowledge of the <> until it was introduced to me on this list. I did find out what it did, and incorporated it into my script. Howe

Re: Data file with records that span two lines

2010-01-20 Thread Uri Guttman
> "PN" == Perl Noob writes: >> the next question is do you understand what that code is doing? and >> what >> the <> operator does? and the -p option? don't just use that code >> without understanding it or you won't learn more perl. this list is >> about learning perl, not just get

Re: Data file with records that span two lines

2010-01-20 Thread Perl Noob
>> "PN" == Perl Noob writes: > > >> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: > >>> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) > >>> wrote: > >>> > ... > >>> > >>>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile > >>> > >> > >> Even easi

Re: Data file with records that span two lines

2010-01-20 Thread Uri Guttman
> "PN" == Perl Noob writes: >> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: >>> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) >>> wrote: >>> > ... >>> >>>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile >>> >> >> Even easier: perl -pe '$_

Re: Data file with records that span two lines

2010-01-20 Thread Perl Noob
> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: >> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) >> wrote: >> > ... >> >>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile >> > > Even easier: perl -pe '$_ .= <>; s/\n//' infile > outfile > > -- > Charles DeRykus MAGI

Re: Data file with records that span two lines

2010-01-20 Thread C.DeRykus
On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: > On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) wrote: > > ... > >  perl -ne '$_ .= <>;s/\n//;print' infile > outfile > Even easier: perl -pe '$_ .= <>; s/\n//' infile > outfile -- Charles DeRykus -- To unsubscribe, e-m

Re: Data file with records that span two lines - REVISITED

2010-01-20 Thread Brad Baxter
On 1/19/2010 6:03 PM, Perl Noob wrote: I am AMAZED at the help available in this forum. It is an awesome resource. I can see, though, that my situation needs to be stated more clearly. The data is not consistent throughout the entire file. I WISH I only had to skip every other line. The prob

Re: Data file with records that span two lines

2010-01-19 Thread C.DeRykus
On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) wrote: > I have a data file with thousands of records.  The problem is that the > records in the data file span two lines for each record.  I want to > write a perl script that makes each record a single line.  The file > looks like thi

Re: Data file with records that span two lines - REVISITED

2010-01-19 Thread Jim Gibson
On 1/19/10 Tue Jan 19, 2010 3:03 PM, "Perl Noob" scribbled: > > The data is not consistent throughout the entire file. I WISH I only > had to skip every other line. The problem is not quite that simple. > The data I need is always consistent within the file, but is not so > neat as to be on

Re: Data file with records that span two lines - REVISITED

2010-01-19 Thread Perl Noob
> On 1/19/2010 12:09 AM, Perl Noob wrote: >> I have a data file with thousands of records. The problem is that >> the >> records in the data file span two lines for each record. I want to >> write a perl script that makes each record a single line. The file >> looks like this: >> >> RECORD1FIELD

Re: Data file with records that span two lines

2010-01-19 Thread Brad Baxter
On 1/19/2010 12:09 AM, Perl Noob wrote: I have a data file with thousands of records. The problem is that the records in the data file span two lines for each record. I want to write a perl script that makes each record a single line. The file looks like this: RECORD1FIELD1 RECORD1FIELD2

Re: Data file with records that span two lines

2010-01-19 Thread Perl Noob
> On Tue, Jan 19, 2010 at 08:12:25AM -0500, Perl Noob wrote: >> > 在 2010-01-19二的 00:09 -0500,Perl Noob写道: >> >> I have a data file with thousands of records. The problem is >> that >> >> the >> >> records in the data file span two lines for each record. I want >> to >> >> write a pe

Re: Data file with records that span two lines

2010-01-19 Thread John W. Krahn
Perl Noob wrote: I have a data file with thousands of records. The problem is that the records in the data file span two lines for each record. I want to write a perl script that makes each record a single line. The file looks like this: RECORD1FIELD1 RECORD1FIELD2 RECORD1FIELD3 RECORD1

Re: Data file with records that span two lines

2010-01-19 Thread Paul Johnson
On Tue, Jan 19, 2010 at 08:12:25AM -0500, Perl Noob wrote: > > 在 2010-01-19二的 00:09 -0500,Perl Noob写道: > >> I have a data file with thousands of records. The problem is that > >> the > >> records in the data file span two lines for each record. I want to > >> write a perl script tha

Re: Data file with records that span two lines

2010-01-19 Thread Perl Noob
> 在 2010-01-19二的 00:09 -0500,Perl Noob写道: >> I have a data file with thousands of records. The problem is that >> the >> records in the data file span two lines for each record. I want to >> write a perl script that makes each record a single line. The file >> looks like this: >> >

Re: Data file with records that span two lines

2010-01-18 Thread Jeff Peng
在 2010-01-19二的 00:09 -0500,Perl Noob写道: > I have a data file with thousands of records. The problem is that the > records in the data file span two lines for each record. I want to > write a perl script that makes each record a single line. The file > looks like this: > HI, If you are using a