- Download the Perl compiler. : http://pan.baidu.com/s/1i3GLKAp
-
Download the file as shown in.
- Installation of Perl.
-
Directly double-click to run the downloaded file, first there will be a Perl version and so on information, ignore, directly next will appear to accept the Perl installation instructions, select Accept as shown, and then continue next.
- After next there will be an option to install the path, you can change the installation path according to your needs or the default installation path is C drive However, since Perl's installation package is actually very small, it is recommended to install directly to the C drive. After setting the installation path, continue to next, and click Next directly in the popup interface.
- When the above step is complete, the setup of Perl installation is complete and the installation is in the final step.
-
Click Next directly on the pop-up screen, and the progress bar will appear, but don't worry, it's going to be fast, no more than 10 minutes. After reading the progress bar will appear a very similar to the beginning of the interface window, directly click Finish to complete the installation.
Generally after the installation, it will automatically open the browser to visit a Perl website ignore, directly close.
- Complete the above installation is configured below.
-
There are two ways to open the CMD Command Editor window first.
The first is to find a "command Prompt" click on the interface that appears directly in the start (All programs) → attachment.
The second way is to start (all programs) → Attachment in the inside find "attachment" click, then enter CMD inside, and then OK.
- Then enter PERL-V in this command window to see if the environment variable is configured.
-
If you configure it, the following will appear, and if not, you will be prompted to say that Perl is not an internal or external command Balabala ... As shown in.
The configuration of this environment variable is not configured because of the system version and so on, and so on, do not worry about this situation, I will finally say how to configure the environment variable.
Now the default environment variables are configured, if you are not configured, please turn to the 10th step follow the prompts to configure, and then back to continue 7, 8, 9 operation.
- The following is the debugging of the Perl script.
-
First, you can write the simplest Perl script with your script editor, if not txt text.
#!usr/bin/perl-w # #-W means to open warning;
Print "Hello world!\n";
After writing, remember to change the file extension from. txt to. pl.
Recommendation: Save the Perl script under the non-kanji path. For example, do not save under the E:\ Learning category.
- After editing the Perl script, open the CMD window to the directory where you are editing the Perl script specific commands are
-
E: Enter here E: is the change drive, the default is C drive.
CD E:\perl Enter (this is the directory I edited) input completed.
Dir Enter dir is the function of displaying the file below the current directory.
Note: This CD is a DOS system directive, if you want to be skilled in using Perl under the Windows system, it is recommended that you simply learn the DOS system commands.
- After entering the E:\perl, you can see from above that I have a hello.pl file under the Perl directory This is the Perl script file that I edited, and we execute it below.
-
Perl hello.pl Enter
You can see the carriage return and output the script we edited earlier.
Print "Hello world!\n";
The execution of the Perl script is complete. If your environment variable does not have a problem, then you can go to the more advanced Perl tutorial to learn Perl, I wish you all learn happy ^_^.
- Now the Perl scripting environment variable configuration, my system because it is Win7 and XP and Win8 slightly different, but the difference is not too big.
-
First right-click the computer and then select Properties, open the Properties interface, and then tap advanced system settings. Then click on the environment variable on the popup screen, specifically.
Then, in the system variables, follow the diagram to find path settings, select Edit.
In the new window, enter the path to the bin where you installed Perl, for example my C:\Perl\bin is then separated by semicolons.
The next step is to make sure that you understand.
Finish OK and go back to the previous 7, 8, 9 operation.
- 11Report:
-
Perl learns one of the most classic textbooks, the Little camel book.
Http://pan.baidu.com/s/1jG7WrVS