File manager - Edit - /usr/share/doc/perl-Capture-Tiny-0.24/examples/tee.pl
Back
use strict; use warnings; use Capture::Tiny qw/capture tee/; print "Type some text. Type 'exit' to quit\n"; my ($out, $err) = tee { while (<>) { last if /^exit$/; print "Echoing to STDOUT: $_"; print STDERR "Echoing to STDERR: $_"; } }; print "\nCaptured STDOUT was:\n" . ( defined $out ? $out : 'undef' ); print "\nCaptured STDERR was:\n" . ( defined $err ? $err : 'undef' );
| ver. 1.4 |
Github
|
.
| PHP 5.6.40 | Generation time: 0 |
proxy
|
phpinfo
|
Settings