Work needs to start with Perl, download a window version (5.16): Download link
Http://www.activestate.com/activeperl/downloads
Once installed, write the first Perl program
#!/usr/bin/perl
print "hello,world!\n";
Run Result: (very much like Python oh)
C:\perl>perl helloworld.pl
hello,world!
Then learned: Cpan, although I do not know what this guy is doing, it should be able to install a variety of bags, more than 9,000 kinds.
Command as follows: Look at the results of the second output, it should be similar to the database Dongdong.
C:\perl>cpan App::cpanminus
Set up GCC environment-3.4.5 (Mingw-vista special R3)
Cpan:term::ansicolor loaded OK (v4.02)
Cpan:storable loaded OK (v2.34)
Reading ' C:\Perl\cpan\Metadata '
Database is generated on Fri, modified 2014 13:06:13 GMT
Cpan:module::corelist loaded OK (v2.80)
App::cpanminus is up to date (1.7001).
Then install the module with the CPANM command as follows: (Cpanm module::name)
C:\perl>cpanm YAML
Set up GCC environment-3.4.5 (Mingw-vista special R3)
--> Working on YAML
Fetching http://www.cpan.org/authors/id/I/IN/INGY/YAML-0.90.tar.gz ... Ok
Configuring YAML-0.90 ... Ok
Building and Testing YAML-0.90 ... Ok
Successfully installed YAML-0.90
1 Distribution installed
If you really do not know how to use words: Cpanm--help//--> will see a lot of tips.
C:\perl>cpanm--help
Set up GCC environment-3.4.5 (Mingw-vista special R3)
USAGE:CPANM [Options] Module [...]
Options:
-V,--verbose turns on chatty output
-Q,--Quiet turns off the most output
Look at the installation process above, it seems to be able to perform cpanm Link, is sure to:
C:\perl>cpanm http://search.cpan.org/CPAN/authors/id/S/SH/SHARYANTO/Alt-Base-0.0
2.tar.gz
Set up GCC environment-3.4.5 (Mingw-vista special R3)
--> Working on http://search.cpan.org/CPAN/authors/id/S/SH/SHARYANTO/Alt-Base-0.
02.tar.gz
Fetching Http://search.cpan.org/CPAN/authors/id/S/SH/SHARYANTO/Alt-Base-0.02.tar
. GZ ... Ok
Configuring alt-base-0.02 ... Ok
==> Found Dependencies:alt
--> Working on Alt
Fetching http://www.cpan.org/authors/id/I/IN/INGY/Alt-0.04.tar.gz ... Ok
Configuring Alt-0.04 ... Ok
Building and Testing Alt-0.04 ... Ok
Successfully installed Alt-0.04
Building and Testing alt-base-0.02 ... Ok
Successfully installed alt-base-0.02
2 Distributions installed
Then you start writing a file-action script that has a path::class module.
Use Path::class;
C:\perl\learn>perl findfile.pl
Can ' t locate path/class.pm in @INC (@INC contains:c:/perl/site/lib/mswin32-x86-
Multi-thread c:/perl/site/lib c:/perl/lib.) At findfile.pl Line 4.
BEGIN failed--compilation aborted at findfile.pl Line 4.
Look at the hint, like did not install the package, installed the next package, the results did not report this error:
C:\perl\learn>cpanm Path::class
Set up GCC environment-3.4.5 (Mingw-vista special R3)
--> Working on Path::class
Fetching http://www.cpan.org/authors/id/K/KW/KWILLIAMS/Path-Class-0.33.tar.gz.
. Ok
Configuring path-class-0.33 ... Ok
Building and Testing path-class-0.33 ... Ok
Successfully installed path-class-0.33
1 Distribution installed
End ~