Help for this page

Select Code to Download


  1. or download this
    #Trying to get default values working here -- still working on it
    
  2. or download this
    chomp($ipbase = <STDIN>);
    
  3. or download this
    $ipbase = <stdin>;
    chomp ($ipbase);
    
  4. or download this
    #I would like to find a way to turn off echo or mask this portion
    print "Password:";
    $password = <stdin>;
    
  5. or download this
    open(INFO,">$downreport");
    
  6. or download this
    open INFO, '>', $downreport or die "Cannot open $downreport:$!\n";
    
  7. or download this
    open my $info, '>', $downreport or die "Cannot open $downreport:$!\n";
    
  8. or download this
    print "What is the base IP? (Example: 192.168.1)\n";
    $ipbase = <stdin>;
    ...
    chomp ($ipend);
    
    # etc....
    
  9. or download this
    sub get_user_input {
        my $prompt = shift;
        print "$prompt\n";
        return chomp(<STDIN>)
    }
    
  10. or download this
    $ipbase = get_user_input("What is the base IP? (Example: 192.168.1)");
    $ipcurrent = get_user_input("What is the bottom IP? (Default 1)");
    $ipend = get_user_input("What is the top IP? (Default 255)");