http://www.perlmonks.org?node_id=1022920


in reply to How to print the contents of system function to a .txt file

Simple one

use strict; use warnings; use autodie; open (my $file, '>', 'result.txt'); print $file `java -jar cmdline-jmxclient-0.10.3.jar - localhost:1100 c +om.ogs.red5.client.manager:name=Manager getConnectedAgents`;