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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [abcindiaxyz] need perl matching - very urgent: Edit Log



KevinR
Veteran


Jan 20, 2008, 11:24 PM


Views: 3350
Re: [abcindiaxyz] need perl matching - very urgent

instead of:


Code
 if (m/@olanglist[$i]/){


try:


Code
 if (m/\Q$olanglist[$i]\E/){


using \Q..\E escapes the meta characters in the search pattern. I'm not sure this will actually solve your problem, but it has to be done anyway.

Also, you should not use @array[n] notation to access the individual elements of an array, use $array[n], which is the proper context.

Please do not use"urgent" in future posts. Your question will be answered or not answered like all other questions.
-------------------------------------------------


(This post was edited by KevinR on Jan 20, 2008, 11:26 PM)


Edit Log:
Post edited by KevinR (Veteran) on Jan 20, 2008, 11:26 PM


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

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