I have a subroutine that performs a print statement as its last command as in the following:
sub test {
# ...
print "how can I capture this in a variable?\n";
}
I am not allowed to change the subroutine. Is there a way to capture the information in the print statement into a variable when I call the test subroutine?
Thanks.
Start Free Trial