in reply to File created but blank
An easier way is just to use system() to directly invoke the command:
If you wanted to open a pipe from the command, you would need to terminate it with a pipe symbol, e.g.system("grep 'packet loss' ... > /home/.../$TARGET_HOST.PL.log");
open(PL, "grep ... | ... |") or die "unable to open pipe from grep command: $!"; while (<PL>) { ... } close(PL);
|
|---|