On both Windows and Unix, there are two output streams, STDOUT and STDERR. The backtick operator captures the STDOUT and lets you use it eg to set $var. STDERR is what you are seeing. (Perl's warn prints to STDERR) What you can do (on Linux machine) is redirect the STDERR to null. I don't think egrep prints to STDERR so I'm gonna assume its cmd that is generating output to STDERR. STDOUT is file descriptor #1 and STDERR is #2. We want to pipe #2 to /dev/null You can do this: my $var = `cmd --arg1 --arg2 2>/dev/null | egrep 'This|That'`
Erm... OK. Don't do that. Perl has a way to allow you to redirect streams that is not OS dependent. I just forget how its done ATM... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/