astronogun has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks I would like to need a hand here regarding this matter hope you could help me on this.
I have this code saved in "test.pl" which is must print the system function to .txt file.
#!/usr/bin/perl -w $input = 'input.txt'; @output = system ("java -jar cmdline-jmxclient-0.10.3.jar - localhost: +1100 com.ogs.red5.client.manager:name=Manager getConnectedAgents>>inp +ut.txt");
When I checked the input.txt file there's no output or it didn't print the result there..
The result should be like this: (when I just use system function and not print it in .txt file) and I want this result to be in .txt file.
03/12/2013 11:43:40 +0800 org.archive.jmx.Client getConnectedAgents: [6569]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to print the contents of system function to a .txt file
by kcott (Archbishop) on Mar 12, 2013 at 05:26 UTC | |
|
Re: How to print the contents of system function to a .txt file
by vinoth.ree (Monsignor) on Mar 12, 2013 at 04:37 UTC | |
|
Re: How to print the contents of system function to a .txt file
by 2teez (Vicar) on Mar 12, 2013 at 05:38 UTC | |
|
Re: How to print the contents of system function to a .txt file
by Anonymous Monk on Mar 12, 2013 at 03:58 UTC | |
by astronogun (Sexton) on Mar 12, 2013 at 04:52 UTC | |
by Anonymous Monk on Mar 12, 2013 at 06:13 UTC |