Then how do I execute the command in $var ? I want to check the return code of that grep command. Please help me. I am new to PERL.
Thanx.. -Bheem -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 11:47 AM To: AITHA, BHEEMSEN (SBCSI) Cc: [EMAIL PROTECTED] Subject: RE: [Perl-unix-users] Please help on GREP command Is that the exact line...? Try: $var=`grep -E -i -c "abc|xyz|pqr" test.txt`; Remember to put your shell commands in back-tics... Dave. -----Original Message----- From: ba2984 [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 1:23 PM To: perl-unix-users Subject: [Perl-unix-users] Please help on GREP command Hi listers, I am using the following command in my perl script. But when I execute the script I am getting the error "Unrecognized file test: -E at test.pl line 9." grep -E -i -c "abc|xyz|pqr" test.txt ; Can someone please tell me what I am doing wrong here ? All I wanted to do is to search for any of the stings abc, xyz or pqr in the file test.txt. Thanx.. -Bheem _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs