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: Beginner:
how do i get grep regex to test 2 arguments

 



gerble1000
User

Jun 17, 2012, 6:42 AM

Post #1 of 2 (573 views)
how do i get grep regex to test 2 arguments Can't Post

hereis what i have

Code
#if (grep{/Message\ Sent\ Successfully/} || {/Your\ message\ has\ been\ sent/} <FILE>){ 
close FILE;
open(F, '>>:utf8', 'sentchecktest.txt');
print F "sent\n";
close F;
}

else{
close FILE;
open(F, '>>:utf8', 'sentchecktest.txt');
print F "error\n";
close F;
}

i have tried a few ways. and tried finding info on this but i cant seem to get anywhere


gerble1000
User

Jun 17, 2012, 6:58 AM

Post #2 of 2 (572 views)
Re: [gerble1000] how do i get grep regex to test 2 arguments [In reply to] Can't Post

hey i managed to do this myself :)
this is what i needed to do

Code
if (grep{/Message\ Sent\ Successfully/ || /Your\ message\ has\ been\ sent/} <FILE>){

ideal

 
 


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

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