David Samuelsson wrote: > > I get some output in the COMMAND filehandle, as you see > i try to dont show it by hiding it into an $output , then > while the COMMAND is running i want perl to interactivly > examine the $output and seach for 10% if its there is should > only print that to the screen. now it still prints all the > $_ to the screen..how do i fix this? > > @vobs = `dir /b $backupdir`; > chomp @vobs;
opendir H, $backupdir or die "Cannot open $backupdir: $!": my @vobs = grep !/^\.\.?$/, readdir H; closedir H; > foreach $vob (@vobs) > { > open(COMMAND, `$dbcheck -a -k -r10 -p8192 $backupdir\\$vob\\db\\vob_db`); ^^^^^^^^ Unless this command returns a _single_, non-newline terminated, file name then you can't do it this way. It would be better to do it like this: chomp( my $file = `$dbcheck -a -k -r10 -p8192 $backupdir\\$vob\\db\\vob_db` ); open COMMAND, $file or die "Cannot open $file: $!"; If the command returns a list of files then you will have to use a loop: chomp( my @files = `$dbcheck -a -k -r10 -p8192 $backupdir\\$vob\\db\\vob_db` ); for my $file ( @files ) { open COMMAND, $file or die "Cannot open $file: $!"; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]