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]
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.