in reply to Re: Array Problem
in thread Array Problem

Thanks for the perl style advice, I'll make sure to change that. Here is a snippet of the ping.txt. I am also looking into Net::Ping, but am not sure how to install it in a Win32 environment.


Reply from 10.0.5.1: bytes=32 time<1ms TTL=255




Request timed out.




Reply from 10.0.5.3: bytes=32 time<1ms TTL=128




Reply from 10.0.5.4: bytes=32 time<1ms TTL=128




Reply from 10.0.5.5: bytes=32 time<1ms TTL=255




Reply from 10.0.5.6: bytes=32 time<1ms TTL=128

Yes, those are spaced like that in the actual file.

Replies are listed 'Best First'.
Re^3: Array Problem
by davidrw (Prior) on Jul 08, 2005 at 15:41 UTC
    There's good stuff in the Tutorials on installing modules (and specifically in Win32 with ppm)

    the spaces should be fine with those regex checks you had.. after seeing the other posts i too think it was the cloberring of ping.txt that made it appear to have no data.. A debugging print statement in there by the regex check may still be a good idea (if in there orginally, it would have pointed in the direction of the clobbering because you'd see that the print wasn't being reached).
Re^3: Array Problem
by larryp (Deacon) on Jul 08, 2005 at 15:45 UTC

    What Perl installation do you have on your Windows box? If you're using ActiveState, do the following to install a module:

    1. Open a DOS prompt.
    2. Change directories to the location where you installed Perl.
    3. Change into the bin subdirectory of your Perl installation.
    4. Type ppm at the prompt.

    This runs the ppm.bat batch file and opens an interactive PPM session. (You can tell you're in a PPM session because the prompt is ppm>.) Type help to get a listing of commands. In the case of Net::Ping, type:

    search Net-Ping

    and press Enter. PPM will search ActiveState repositories for the module and return a numbered listing of its findings. For example:

    ppm> search Net-Ping Searching in Active Repositories 1. Net-Ping-External [0.11] Cross-platform interface to ICMP "ping" +utilities ppm>

    To install one of the listed modules, simply type the install command along with the name, or number, of the desired package, like so:

    ppm> install 1 or ppm> install Net-Ping-External

    PPM will fetch and install the module and write a series of messages to the screen. When it completes, it returns to the PPM prompt. Type q to quit the PPM session.

    PPM will make your module-installing life much easier under Windows. :)

    I hope this helps.

    /Larry