Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re: Re: Re: Matching Question

by mr2 (Friar)
on Sep 21, 2002 at 09:38 UTC ( [id://199723] : note . print w/replies, xml ) Need Help??

in reply to Re: Re: Matching Question
in thread Matching Question

you need every line to be cmop'ed $_="go\n" ... chomp() does it.
... while (<FILE>) { $count++; $text = $_; ## this is what you need chomp($text); ## this is what you need if ($text eq "go") { $gocount++ if s/^go/\//g; print OUT; ...

Replies are listed 'Best First'.
Re: Re: Re: Re: Matching Question
by curtisb (Monk) on Sep 23, 2002 at 11:24 UTC
    That fixed the problem I was having. Now, I just have to figure out how to read something like this.
    CREATE TABLE "a2k"."DA2404_DISCREPANCY" ( "MR_CONTROL_NO" varchar(30) NOT NULL, "DISCREP_NO" integer NOT NULL, "TM_ITEM" varchar(4) NULL, "STATUS" varchar(1) NULL, "DEFICIENCY" varchar(30) NULL, "CORRECTION" varchar(30) NULL, "INITIALS" varchar(3) NULL, PRIMARY KEY ("MR_CONTROL_NO", "DISCREP_NO") WITH HASH SIZE 10 ) go
    I want to change VARCHAR to VARCHAR2. I know that the ^ is to anchor at the beginning of a line. What does the $ do, exactly?