Difference between revisions of "Perl in Windows"
(→Running Perl) |
|||
Line 30: | Line 30: | ||
Below you can see how a small 'Hello world' script, that we check its content by using <code>more</code> command, is launched. | Below you can see how a small 'Hello world' script, that we check its content by using <code>more</code> command, is launched. | ||
− | <code>perl hello.pl</ | + | <code>perl hello.pl</code> |
[[Image:Windows-command-prompt-perl.png]] | [[Image:Windows-command-prompt-perl.png]] | ||
+ | |||
+ | <a href="http://en.wikipedia.org/wiki/Shebang_%28Unix%29">Shebang</a> line (the one starting with #!), typical of UNIX systems, is ignored in Windows. |
Revision as of 15:34, 2 April 2012
Perl programming language is distributed by default in most Linux distributions and also in all Mac OS X versions up to now. However, Windows users need to install it by themselves.
- You can download last Perl version from Windows here: Strawberry Perl
Below some screenshots and hints for starting to use Perl in Windows.
Find Windows terminal
The easiest way to access to terminal in Windows is by typing its name. Of course, you can decide to make a shortcut link for future uses.
Windows Terminal commands
Commands are not exactly the same as in UNIX (Linux & Mac OS X) systems.
At least, you should know:
- dir (list a directory content)
- cd (change current directory)
As reference:
Running Perl
Strawberry Perl adds the perl
command to the Windows System and becomes accessible from the terminal.
Below you can see how a small 'Hello world' script, that we check its content by using more
command, is launched.
perl hello.pl
<a href="http://en.wikipedia.org/wiki/Shebang_%28Unix%29">Shebang</a> line (the one starting with #!), typical of UNIX systems, is ignored in Windows.