Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: PERL SCRIPT FOR IPv6 LOOK-UP

by Generoso (Prior)
on Jun 08, 2010 at 20:25 UTC ( [id://843732]=note: print w/replies, xml ) Need Help??


in reply to Re^3: PERL SCRIPT FOR IPv6 LOOK-UP
in thread PERL SCRIPT FOR IPv6 LOOK-UP

Try this, it is working for me.

#!/usr/bin/perl use Net::Ping; open(INFILE, "<", "d:\\file2.txt") or die("cannot open infile: $!"); my @ip_array = <INFILE>; close(INFILE); open(OUTFILE, ">", "d:\\ping_output") or die("unable to write output: +$!"); chomp(@ip_array); $p = Net::Ping->new(); foreach(@ip_array) { if($_ =~ /\d+.\d+.\d+.\d+/) { if($p->ping($&)) { print OUTFILE ("$_ is responding to ping.\n"); } else { print OUTFILE ("$_ is NOT responding to ping.\n"); } } } close(OUTFILE);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://843732]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found