in reply to simple menu loop problems

Probably not as cool as all the others, but it is simmilar. Just an idea for you. I made a couple of menu scripts for work stuff.. All I know is it works just the same..

#!/usr/bin/perl -w use strict; my $read; sub menu { print "1) Cancel FINAL Schedule for machine A\n"; print "2) Submit new FINAL schedule\n"; print "3) Ignore Wrkld\n"; print "4) Run around the block\n"; print "5) Buy a new car\n"; print "6) order Pizza\n"; print "7) exit\n"; } for (;;) { &menu; chomp($read = <STDIN>); exit 0 if $read=~ /7/; print "You have chosen option $read\n"; print "Enter a number for the option you want\n"; }


-- Yes, I am a criminal. My crime is that of defyance.