in reply to redirect grep output

You don't show where the value that ends up in $log1 comes from originally, but I'll bet you need to chomp it to remove a newline. If $log1 ends in a newline, then you're really passing two separate commands to system, an fgrep and a redirection of nothing.

Replies are listed 'Best First'.
Re: Re: redirect grep output
by Anonymous Monk on Jan 12, 2001 at 23:50 UTC
    Thanks alot! A stupid mistake, but I am by no means a "Perl Monk". I chomped the var and it worked great!
    Kenny