RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread AITHA, BHEEMSEN (SBCSI)
Bheem -Original Message- From: Arnold, Craig [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 1:07 PM To: AITHA, BHEEMSEN (SBCSI); '[EMAIL PROTECTED]' Subject: RE: [Perl-unix-users] Please help on GREP command You appear to be trying to use the command-line version of grep, rat

RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread AITHA, BHEEMSEN (SBCSI)
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 1:10 PM To: AITHA, BHEEMSEN (SBCSI) Cc: [EMAIL PROTECTED] Subject: RE: [Perl-unix-users] Please help on GREP command Sorry All... The 'die' command should have read: die "ERROR: Problem exec

RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread david . b . deline
3:08 PM To: 'ba2984' Cc: 'perl-unix-users' Subject: RE: [Perl-unix-users] Please help on GREP command The back-tics will automatically execute the grep command. So, $var=`grep -E -i -c "abc|xyz|pqr" test.txt`; will execute the grep command just like from the sh

RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread Arnold, Craig
You appear to be trying to use the command-line version of grep, rather than a Perl grep. To get what you appear to be looking for in Perl would require opening the file: Script: grep.pl #!perl -w use strict ; my $fn = "test.txt" ; open(INFILE, $fn) or die "Can'

RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread david . b . deline
EMAIL PROTECTED]] Sent: Monday, February 18, 2002 2:52 PM To: david.b.deline Cc: perl-unix-users Subject: RE: [Perl-unix-users] Please help on GREP command 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 -

[PMX:XXXXX] RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread 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]] Se

RE: [Perl-unix-users] Please help on GREP command

2002-02-18 Thread david . b . deline
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