in reply to Array Problem

Since you open ping.txt for reading and immediately for writing, you globber the file. That's why is empty (apart from the statistics lines you put in).
because of that, @results will be an empty list, which saves you from the next problem: the infinite loop in while (@results) {...}

To loop over all elements of result, use:

foreach (@results) { ... }
Use different files for reading and writing or read the file first, then reopen it for writing.

Lastly, put

use strict; use warnings;
on top off your programs :)

Paul

Replies are listed 'Best First'.
Re^2: Array Problem
by wanderinweezard (Initiate) on Jul 08, 2005 at 15:29 UTC
    What does
    use strict; use warnings;
    do? I added it and it stopped the program from completing execution?

      Check out the tutorial: Use strict warnings and diagnostics or die - it should answer your question. Be sure to read the replies too.

      "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce