created MNU.pm and drv.pl

This commit is contained in:
gashapwn 2021-04-11 22:41:44 +00:00
parent 6276952ec3
commit 93a646a591
2 changed files with 37 additions and 0 deletions

25
MNU.pm Normal file
View 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;

12
drv.pl Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/perl
use warnings;
use strict;
use lib "./";
use MNU;
while(MNU->loop()){
}