Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Perl Script - deleting lines

Re: Perl Script - deleting lines

From: guy ruth hammond <grh_at_agency.com>
Date: Wed, 26 Jul 2000 16:43:38 -0400
Message-Id: <10570.113050@fatcity.com>


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 |       -- Baudelaire
Received on Wed Jul 26 2000 - 15:43:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US