#!perl -w use Getopt::Std; use vars qw($opt_S $opt_U $opt_D $opt_P); $opt_S = 'DEFAULTSERVER'; $opt_U = 'defaultuser'; getopt('SUDP'); unless (defined $opt_P) { print "Password: "; system "stty -echo"; $opt_P = <>; print "\n"; system "stty echo"; } do { my $num = 1; my $line = ""; while ($line !~ /^go|;/) { print "$opt_U-$opt_S $num>"; $line = <>; $num++; chomp $line; exit if $line eq 'exit'; $num = 1 if $line eq 'reset'; } print <