in reply to Re: Deleting everything before a string
in thread Deleting everything before a string

And then of course writing the new $content over the file you read in from.

On the other hand if you are dealing with a large file then I would suggest searching line by line (or chunk by chuck) for +_...+_ and then storing that, closing the file, writing the found information to a new file of the same or different name.

  • Comment on Re: Re: Deleting everything before a string

Replies are listed 'Best First'.
Re: Re: Re: Deleting everything before a string
by I0 (Priest) on Dec 21, 2000 at 19:28 UTC
    Or perhaps setting $/ to '+_' and $^I to '.bak'