I have a interesting problem now,the below code dumps "$stdout" output of the $cmd command run to "p4diff.log",what I noticed is it's not entering the while loop if I do this where as if I use a pre-existing p4diff.log without generating through the program it enters the program,any idea what could be wrong in the below code
$cmd = [ (qw(p4 diff -f -sl), $options{v}) ];
run3($cmd, \$stdin, \$stdout, \$stderr);
#print "\n$stderr\n";
#Output the diff to p4diff.log
open(my $P4DIFF, '+>', "p4diff.log") or die $!;
print $P4DIFF $stdout;
$input = <p4diff.log>;
#Open teh p4diff.log to get the missing files and output to dele
+tefiles.txt
open(my $OUTPUT, '+>', "deletefiles.txt") or die $!;
open my $DATA, '<', $input or die "could not open '$input' $!";
while ($line = <$DATA>)
{
print "IN WHILE LOOP\n";#not printing
if ($line =~ /missing/)
{
$line =~s/\\/\//g;
$line =~s/\Q$client_root\E/$perforce_root_dir/g;
print "$line\n";
print $OUTPUT $line;
}
}
close $OUTPUT;