Re: Search and replace values in a fixed-width file

2006-02-10 Thread John W. Krahn
Ken Hill wrote: > I have the following perl script that reads a fixed-width file and > replaces values in various sections of the file. > > --- > open (IN, '< in.txt'); > open (OUT, '> out_test.txt'); You should verify that the files were opened successfull

Re: Search and replace values in a fixed-width file

2006-02-10 Thread Chas Owens
On 2/10/06, Chas Owens <[EMAIL PROTECTED]> wrote: > On 2/10/06, Ken Hill <[EMAIL PROTECTED]> wrote: > > I have the following perl script that reads a fixed-width file and > > replaces values in various sections of the file. > > > > --- > > open (IN, '< in.txt

Re: Search and replace values in a fixed-width file

2006-02-10 Thread Chas Owens
On 2/10/06, Ken Hill <[EMAIL PROTECTED]> wrote: > I have the following perl script that reads a fixed-width file and > replaces values in various sections of the file. > > --- > open (IN, '< in.txt'); > open (OUT, '> out_test.txt'); > > while () { > >

Search and replace values in a fixed-width file

2006-02-10 Thread Ken Hill
I have the following perl script that reads a fixed-width file and replaces values in various sections of the file. --- open (IN, '< in.txt'); open (OUT, '> out_test.txt'); while () { chomp; $first_section = substr $_, 0, 381; # ex