Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Perl Script - deleting lines
rsands_at_lendleaserei.com wrote:
>
> hello all,
>
> I'm trying to convert some scripts into perl,
> learning as I go. What's the best way to delete
> an entire line from a text file? I'm having no
> trouble substituting values, but there are a
> couple of lines I need to remove entirely,
> preferrably by matching the first part of the
> text in the line.
$variable=`cat $filename`;
$variable =~ s/string.*\n//gis;
print $variable;
off the top of my head :0)
g
-- guy ruth hammond <grh_at_agency.com> | One is punished for being Technology Analysis & Consulting | weak, not for being cruel. 617 4521300 http://www.agency.com | -- BaudelaireReceived on Wed Jul 26 2000 - 15:43:38 CDT
![]() |
![]() |