Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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; ...


Comment on Re: Re: Re: Matching Question
Download Code
Re: Re: Re: Re: Matching Question
by curtisb (Monk) on Sep 23, 2002 at 11:24 UTC
    Thanks,
    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?
    Thanks,
    Bobby

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-07-07 05:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls