26 lines
279 B
Perl
26 lines
279 B
Perl
|
#!/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;
|