Technology Mobile-Cell-Phone

How to Read Text Input From DOSBox With Perl

    • 1). Open DOSBox. Type "PEDIT" and press "Enter" to open the DOS editor.

    • 2). Type the following example script:
      #! /usr/bin/perl
      print "What's your favorite number?"
      $fave = <>;
      print "Wow $fave is your favorite number:";

    • 3). Click to exit and save the file, naming it "test.pl" or something similar.

    • 4). Type "test.pl" and press "Enter" to run the script. It will prompt "What's your favorite number?" At this point, type in your favorite number and press "Enter." This then passes that text input, typed into DOSBox, into Perl.

Leave a reply