Fix join()ed readline (PBP)

Use $/ to slurp the whole handle instead of splitting and joining.
This commit is contained in:
Dan Church 2023-07-20 14:00:46 -05:00
parent 9115c6bdca
commit d6be215a06
Signed by: h3xx
GPG key ID: EA2BF379CD2CDBD0

View file

@ -121,10 +121,11 @@ sub run_script_capture {
seek $handle, 0, 0;
}
local $/;
return (
$?,
(join "\n", <CATCHOUT>),
(join "\n", <CATCHERR>)
scalar <CATCHOUT>, # slurp!
scalar <CATCHERR>, # slurp!
);
}