I made a code in Perl that (please don't laugh) takes a ping log out from a
file, and analyze it, counting lost pings, ping time, etc, and make a little
ASCII Graphic, and all.
It's not a very useful software, if I tell you that I use windows, and that is
thousands of free applications for things like that on websites, but doesn't
matter, I made it for educational reasons, to learn a little more.
My problem in this moment is to LOG the pings.
How I do it? I execute a separated command line ping -t perlmonks.org >ping.log, and then in my little code, I analyze this file ping.log.
As far as I remember in my lazy attempts to read the Camel Book, there are two
ways to execute and external command in Perl: system, and exec.
exec, execute, and dies.
system, executes, waits until the procedure is finished and then continues the
program.
In this case, NONE works. I'd need to have something that could execute
something and forget about it, is there something in Perl to do that?
-------
[]'s
FiReWaLL
The mand with the red hat.
In reply to Executing independent commands in PERL by FiReWaLL
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |