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
1 changed files with 3 additions and 2 deletions

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!
);
}