Re: to delete only one line

2001-06-22 Thread Nigel Wetters
ADD ERROR CHECKING! Lots of memory (small file)? Read file line by line into a scalar, ignoring the line you want to omit. Close the file, then open and overwrite with your scalar. $ignore_line = 42; $count = 0; $file = ''; open(FH,"){ $count++; $file .= $line unless ($count == $ignore_

Re: to delete only one line

2001-06-22 Thread Jos Boumans
maybe there's a more elegant way, but this will work: open I, "input.txt"; open O, "output.txt"; while() { print O unless $. == $foo } where $foo is the line number you dont want printed. hth, Jos Boumans Stéphane JEAN BAPTISTE wrote: > HI. > > I'm looking for a method to delete the line nu

to delete only one line

2001-06-22 Thread Stéphane JEAN BAPTISTE
HI. I'm looking for a method to delete the line number x into a file. Is it simply possible ? tks