Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Re: Matching Question

by mr2 (Friar)
on Sep 21, 2002 at 09:38 UTC ( #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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://199723]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2016-10-27 07:53 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (355 votes). Check out past polls.