in reply to Re^2: How to pass data as STDIN to Capture::Tiny
in thread How to pass data as STDIN to Capture::Tiny
"This works, but you can't trust the exit value returned as the 3rd output value of capture and must instead inspect $?."
Well, the documentation for Capture::Tiny v0.44 (the latest version, at the time of writing, and the version I used) states:
"The capture function takes a code reference and returns what is sent to STDOUT and STDERR as well as any return values from the code reference." [my emphasis]
I took this to be correct but maybe you have other information. Please share.
I did a quick test. The third value, when captured, did contain the return value of the code reference. Could you provide some code showing this third value with something other than the return value of the code reference.
— Ken
|
|---|