crontab: /1 * * * * /root/scripts/perf/test.pl > /tmp/test.txt 2>&1 #!/usr/local/bin/perl @route = qx { hping -S 81.196.2.58 -c 3 -p 80 2>&1 }; chomp(@route); @route = grep(/\w+/g, @route); foreach $line (@route) { print "$line\n"; }