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_
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
HI.
I'm looking for a method to delete the line number x into a file.
Is it simply possible ?
tks