in reply to Directing STDOUT of called perl script to a variable within a calling perl script
#!/usr/bin/perl use strict; use warnings; use IPC::System::Simple qw/capturex/; my $cap = capturex("perl", "/root/Desktop/abc.pl"); die "Couldn't capture output: $!" unless $cap; print $cap;
|
|---|