- Perl ›
Explains how to use Windows Command Prompt to run Perl. Command Prompt is a CLI tool to run programs on Windows.
Execution of Command Prompt
Let's execute Command Prompt.
"Start Menu" | "Apps" | "Windows System Tools" | "Command Prompt"
Your home directory is shown on Command Prompt.
Showing File Extensions
The extension of Perl program is ".pl". It is useful if extensions of files are displayed.
The way to show file extensions is described in the following page.
Execution of Notepad
Perl programs are text files. You can create your Perl programs using Notepad.
The way to use Notepad is described in the following page.
Creating Perl Programs
Let's create a Perl program.
Create a file named "start.pl" at your home directory.
And write the following text.
print "Hello World";
And save it.
Runing Perl Programs
You can run your Perl program using perl command.
The output is:
Commands of Command Prompt
Intorduce offten used commands of Command Prompt.
The "dir" command displays the list of files.
The "cd" command changes the working directory.
".." is the file name that means the folder one level higher.
You can change drives using "c:" or "d:".
Seeing Command Histories
You can see command histories using "↑" and "↓" keys.
Getting Environment Variables
You can get and show a environment variable as the following.
Setting Environment Variable
You can set a environment variable as the following.