Re: question about appending spaces to each line of a file

2005-06-06 Thread Chris Devers
On Mon, 6 Jun 2005, Offer Kaye wrote: > On 6/6/05, Nupur Pande wrote: > > The interesting thing is "chomp"ing twice did not > > seem to help either. > > Of course not. "chomp" removes "$/" only, and unless you changed it, > it is equal (on Linux) to "\n". Right. chomp() once or chomp() 100 times

Re: question about appending spaces to each line of a file

2005-06-06 Thread Offer Kaye
On 6/6/05, Nupur Pande wrote: > The interesting thing is "chomp"ing twice did not > seem to help either. Of course not. "chomp" removes "$/" only, and unless you changed it, it is equal (on Linux) to "\n". Read "perldoc -f chomp" (http://perldoc.perl.org/functions/chomp.html). As an experiment, t

RE: question about appending spaces to each line of a file

2005-06-06 Thread Nupur Pande
t;chop" did. Just thought I'd share that with you all. Thanks again! Nupur -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 6:59 PM To: Nupur Pande Cc: beginners@perl.org Subject: Re: question about appending spaces to ea

Re: question about appending spaces to each line of a file

2005-06-03 Thread Chris Devers
On Fri, 3 Jun 2005, Nupur Pande wrote: > I want to read each line from a file, chomp off the newline character, > append 6694 spaces to the end of each line and then output the line > into a new file. > > The code I have is this: > > [...] > > for ($i = 0; $i < 6694; $i++) { > $line = $line.

Re: question about appending spaces to each line of a file

2005-06-03 Thread Jeff 'japhy' Pinyan
On Jun 3, Nupur Pande said: I want to read each line from a file, chomp off the newline character, append 6694 spaces to the end of each line and then output the line into a new file. while ($line = ) { chomp $line; $lengthofLine = length($line); Ok so far... for ($i = 0; $i < 6694; $i++

question about appending spaces to each line of a file

2005-06-03 Thread Nupur Pande
Hi, I have a weird problem in perl. I want to read each line from a file, chomp off the newline character, append 6694 spaces to the end of each line and then output the line into a new file. The code I have is this: while ($line = ) { chomp $line; $lengthofLine = length($line); f