Re: Using grep to check contents of file

2004-11-25 Thread Gunnar Hjalmarsson
[ Please type your reply *below* the part(s) of the message you are commenting on. ] FlashMX wrote: Gunnar Hjalmarsson wrote: FlashMX wrote: Is this correct? What happened when you tried to run it (with strictures and warnings enabled)? I had to disable the warnings because I get an error: Can't l

Re: Using grep to check contents of file

2004-11-25 Thread FlashMX
I had to disable the warnings because I get an error: Can't locate warnings.pm in @INC at test.pl line 3. BEGIN failed--compilation aborted at test.pl line 3. When I disable the warnings my script runs but it doesn't find the match from my grep even thought the text I'm trying to find IS in th

Re: Using grep to check contents of file

2004-11-25 Thread Gunnar Hjalmarsson
FlashMX wrote: Is this correct? What happened when you tried to run it (with strictures and warnings enabled)? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Using grep to check contents of file

2004-11-25 Thread FlashMX
Is this correct? I need to run GREP to check file(s) for some text and if I find a match then execute my code. my $file = 'input.file'; if (grep(/FIND MATCH/i, $file)) { Found a match...run code } else { No match found } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman