Re: split and replace

2001-11-29 Thread John W. Krahn
Shaunn Johnson wrote: > > --Howdy: > > --This is what I wound up using: > > [example] > > open (FILE, "+ > while () { > s/(\d+)$/0$1/; > print; > } > close FILE > > [/example] > > --The interesting thing is that if I have a decimal > in there, it puts the zero in front of th

RE: split and replace

2001-11-29 Thread Johnson, Shaunn
--Howdy: --This is what I wound up using: [example] open (FILE, "+) { s/(\d+)$/0$1/; print; } close FILE [/example] --The interesting thing is that if I have a decimal in there, it puts the zero in front of the decimal, but not the whole number. I'm not sure why, but for now

RE: split and replace

2001-11-29 Thread Johnson, Shaunn
--Howdy all: --I *DO* want to replace every occurance of each value in the last column with a zero before it ... not just a single diget. -X > -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > > > > -Original Message- > > From: Adam Turoff [mailto:[EMAIL PR

RE: split and replace

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 12:12 PM > To: 'Adam Turoff'; Johnson, Shaunn > Cc: [EMAIL PROTECTED] > Subject: RE: split and replace > > > > -Original Message--

RE: split and replace

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Adam Turoff [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 12:08 PM > To: Johnson, Shaunn > Cc: [EMAIL PROTECTED] > Subject: Re: split and replace > > ... > s/(\d+)$/sprintf("%02d", $1)/e; T

Re: split and replace

2001-11-29 Thread Adam Turoff
On Thu, Nov 29, 2001 at 11:53:38AM -0500, Johnson, Shaunn wrote: > [sample] > > 2001q2 06 P92786 IEMMM01 1 6 > 2001q2 06 P92786 IEMMM01 1 8 > 2001q2 06 P56576 IEMFF01 1 23 > > [result] > > 2001q2 06 P92

split and replace

2001-11-29 Thread Johnson, Shaunn
Howdy: I must be going about this the wrong way. I'm trying to modify a script and concatenates text files into one large file. That works. There is a part where inside the text file are six columns. The last column is what I need to edit. It's alpha_numerical. I want to edit the sixth colum