Um... so everyone who uses 'print' or 'printf' needed to use IO::Handle? I doubt that is what you mean, is it?
In any case, changing the code from '$fh->print' to 'print $fh' seems to have fixed the problem. Of *course* it makes sense -- it's perl!
:-)
That uncovered one last (??*crossing fingers*??) bug where the 'cat' was involved, which was unrelated to the 'rev', which I just supplied in my test directory (in a perl-1-liner script).simulated in a perl 1-liner:
P> more t/rev
sub rv{1>=length $_[0]?$_[0]:substr( $_[0],-1).rv(substr $_[0],0,-1)}
+$_=<>;chomp; print rv($_);
The 'cat' was for my STDERR test, which I cleaned up (and got rid of using 'cat' in testing...didn't want any Humane Society/PITA complaints). It's a split output, where the first part of the line put out by the 'generic example' code is on STDOUT, and the 2nd part is on STDERR... so I just run it twice for that test:
if ($caseno == 5) {
my $null;
my $dev;
open($null, ">", $dev="/dev/null") or
open($null, ">", $dev="NUL:") or
die "Cannot open /dev/null nor NUL:";
close ($null);
my $resp = get_case($matchp->[0],"2>$dev");
$resp =~ m{$weak_match_expr};
($rcase,$name, $rstr) = ($1,$2,$3);
$resp = get_case($matchp->[0],"2>&1 >$dev");
$resp =~ m{$weak_match_expr};
$rstr = $2;
}
....
ok($rcase && $caseno == $rcase, "received testcase $caseno");
if (length($re)) {ok($rstr =~ m{$re}, $name)}
}
Hopefully "/dev/null" or "NUL" will work (it works on my linux and on
Windows strawbelly16.2.)
Tedia, tedia, tedia....;-)
Thanks again for the assists...this is my testing the waters, as it were...
hopefully it will go well...
|