Under windows you would follow these steps:
- Install Perl (ActiveState, or Strawberry, for example) as per the vendor's instructions.
- At the DOS prompt (is that what they still call it?) verify that perl, the executable works, by typing perl -v. If that gives you a Perl version number, perl works, and seems to be included in your path properly.
- Type your program in using a text editor. The one you demonstrated for us should be fine. Save it somewhere you can find it later. Give it a name you will remember. Perhaps, "mytest.pl"
- At the DOS prompt, make sure you're in the directory where mytest.pl was saved, and type this: perl mytest.pl
It's been awhile since I did much with Windows, but that really ought to work for you. If it doesn't, let us know what step fails, and what messages you get.