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