#/usr/local/bin/perl $TEMP = "/tmp/pchelp$$"; $DEST = 'pctech@technics.pyro.edu'; $login = $ENV{'USER'} || getlogin; $gcos = (getpwnam($login))[6]; ($name, $loc, $ext) = split(/,/, $gcos); $EDITOR = $ENV{"VISUAL"} || $ENV{"EDITOR"} || "vi"; $PAGER = $ENV{"PAGER"} || "more"; open(FORM, ">$TEMP") || die "Can't create temp form: $!\n"; system 'clear'; chop($prompt = <<'EOP'); What do you want to do? a) PC problem report b) Software order request c) Hardware order request q) Quit Select an option [q]: EOP print $prompt; ($ans = substr(,0,1)) =~ y/A-Z/a-z/; { goto problem if $ans eq 'a'; goto software if $ans eq 'b'; goto hardware if $ans eq 'c'; goto end; } whatnow: { print "\nWhat now? "; ($ans = substr(,0,1)) =~ tr/A-Z/a-z/; goto mail if $ans eq 's'; goto edit if $ans eq 'e'; goto end if $ans eq 'a'; goto end if $ans eq 'q'; goto list if $ans eq 'l'; goto help; } help: { print "Options are:\n"; print " abort\n"; print " edit\n"; print " list\n"; print " send\n"; goto whatnow; } problem: { print FORM <