in reply to Writing a text adventure in Perl
If your goal is to enhance your Perl programming skills, I recommend you set modest goals, particularly for your command parser. What are you finding difficult about recognizing when a command is entered? It seems like you should have a main loop that looks like this:
Where your handle_command sub is going to split the command and recognize whether it's a direction or verb noun or whatever.while (<STDIN>) { # Command is in $_ chomp; handle_command($_); }
|
|---|