CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [regex2012] additional question: Edit Log


Dec 15, 2015, 12:49 PM

Views: 4197
Re: [regex2012] additional question

If /$i/ and /CORP-GOLD-NETAPP_LEGAL1-NDMP/ produce different results, they must be different. You have shown that $i comes from one line of @line1 which you read from a file. Every line of a file (and therefore $i) ends with a newline. Your fixed regex does not. You must fix this. It would be wild speculation to say that this is the only difference. Fishmonger and myself have both said we need code and data. In order to debug your problem, we must be able to reproduce it on our own machines. We do not need much data and it does not have to be real, but it must demonstrate the problem.

Note: Your use of while and if rather than grep is probably a good idea, but it does nothing to solve the problem. You must get the regex right in either case.

UPDATE: See Cris's reply to;. I think you could adapt it to your problem.
Good Luck,

(This post was edited by BillKSmith on Dec 16, 2015, 6:45 AM)

Edit Log:
Post edited by BillKSmith (Veteran) on Dec 16, 2015, 6:45 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives