I think the problem is the shell-out to ls within the system command: egrep "$JOBSTART\|$CONDSTART\|$JOBEND\|$CONDEND\|$JOBCANC\|$VOLUSED" `ls -tr ../logs/3*.log` >$OUT_TEMP
The NT command processor won't understand that and treat it as an option for egrep instead. Instead, you will have to generate the lists of files manually and pass them as arguments to egrep, something like: $files = `ls -tr ../logs/3*.log`; $grepexpr = "egrep \"$JOBSTART\|$CONDSTART\|$JOBEND\|$CONDEND\|$JOBCANC\|$VOLUSED\" $files >$OUT_TEMP"; system "$grepexpr"; There are more perlish ways of doing this but I guess you're after a quick fix :-) -- Simon Oliver _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
