#!/usr/bin/perl use strict; use Menu; my $username=getlogin(); my $infile="/tmp/$username.inFile"; my ($script,$infile=mainMenu($infile); #### sub mainMenu { my $infile=shift; my ($choice,$notice); while (1) { system("clear"); print BOLD BLUE < "); if ($choice =~ /a/i) { accountMenu($infile); last; } else { $notice="INVALID OPTION!"; next; } } } sub accountMenu { my $infile=shift; my ($notice,$choice); while (1) { system("clear"); print BOLD BLUE <## sub getInput { my $message = shift; my $return; print "$message"; chomp($return=); return $return; } #### sub addAccount { my $infile = shift; while (1) { system("clear"); print BOLD BLUE < "); if ($choice == 1) { loadFile(); last; } elsif ($choice == 2) { manuallyEnterUser(); last; } elsif ($choice =~ /a/i) { accountMenu(); } elsif ($choice =~ /m/i) { mainMenu(); } elsif ($choice =~ /e/i) { exit(0); } else { $notice="INVALID OPTION"; next; } } }