Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    
  3. or download this
    my $INPUT_FILE = "ipnum";
    
  4. or download this
    open(INPUT_FILE);
    @array = ;
    close(INPUT_FILE);
    
  5. or download this
    open INPUT_FILE, $INPUT_FILE
        or die "Can't open $INPUT_FILE: $!";
    my @array = <INPUT_FILE>;
    close INPUT_FILE
        or die "Can't close $INPUT_FILE: $!";
    
  6. or download this
    for my $address (@array) {
        my $output = `nslookup $address`;
        print $output;
    }