in reply to pulling value based on input
## Carries out the users input into an action print "\n"; print "Where do you want to copy from? or type help for help\n"; my $server = <STDIN>; chomp $server; print "What do you want to copy? or type help for help\n"; my $loc = <STDIN>; chomp $loc; if ((exists $servers{$server}) and (exists $locs{$loc})) { print "\n"; print "Ok, Copying $loc Logs from Source: $servers{$server} to tem +porary location:\n"; print "$temp\n\n"; sleep "3"; print "Ok, all done.\n\n"; print "Zipping and moving to FTP Server:\n"; print "$ftp$folfix-$date\n"; } elsif ((my $server = 'help') or (my $loc = 'help')) { print "$sitrep\n"; print "---Log abb:\n"; foreach $locs (sort keys %locs) { print "$locs\n"; } } else { print "Error: unrecognized server\n"; }
|
|---|