From 93a646a591a3e20978f1af2c32579401b5c52070 Mon Sep 17 00:00:00 2001 From: gashapwn Date: Sun, 11 Apr 2021 22:41:44 +0000 Subject: [PATCH] created MNU.pm and drv.pl --- MNU.pm | 25 +++++++++++++++++++++++++ drv.pl | 12 ++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 MNU.pm create mode 100644 drv.pl diff --git a/MNU.pm b/MNU.pm new file mode 100644 index 0000000..3a0b1b9 --- /dev/null +++ b/MNU.pm @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +package MNU; + +sub prompt(){ + printf("> "); + my $in; + $in = ; + chomp $in; + + return $in; +} + +sub loop(){ + my $in = prompt(); + + return 0 unless $in; + return 0 if $in eq "quit"; + return 1; +} + +return 1; diff --git a/drv.pl b/drv.pl new file mode 100644 index 0000000..66c0644 --- /dev/null +++ b/drv.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +use lib "./"; +use MNU; + +while(MNU->loop()){ + +} +