created MNU.pm and drv.pl
This commit is contained in:
parent
6276952ec3
commit
93a646a591
25
MNU.pm
Normal file
25
MNU.pm
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
package MNU;
|
||||
|
||||
sub prompt(){
|
||||
printf("> ");
|
||||
my $in;
|
||||
$in = <STDIN>;
|
||||
chomp $in;
|
||||
|
||||
return $in;
|
||||
}
|
||||
|
||||
sub loop(){
|
||||
my $in = prompt();
|
||||
|
||||
return 0 unless $in;
|
||||
return 0 if $in eq "quit";
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
Loading…
Reference in New Issue
Block a user