in reply to Re^2: Help with redirecting Find::File results
in thread Help with redirecting Find::File results
All you have to do is change where you print in doexec(). Suppose you've opened OUTPUT earlier in the program. Change your subroutine to something like:
sub doexec { my $okCw shift; my @command = @_; # copy so we don't try to s/// aliases to consta +nts for my $word (@command) { $word =~ s#{}#$name#g } if ($ok) { print OUTPUT "@command"; return 0 unless <STDIN> =~ /^y/; } chdir $cwd; #sigh system @command; chdir $File::Find::dir; return !$?; }
|
|---|