Difference between revisions of "Perl in Windows"

From Bioinformatics Core Wiki
(Find Windows terminal)
Line 7: Line 7:
 
=== Find Windows terminal ===
 
=== Find Windows terminal ===
  
The easiest way for accesing the terminal in Windows is by typing its name in the launch bar. Of course, afterwards, you can decide to make a shortcut link in the desktop or in the Windows bar.
+
The easiest way for accessing the terminal in Windows is by typing its name in the launch bar or directly writing <code>CMD</code>. Of course, afterwards, you can decide to make a shortcut link in the desktop or in the Windows bar.
  
 
[[Image:Windows-command-prompt.png]]
 
[[Image:Windows-command-prompt.png]]

Revision as of 16:04, 2 April 2012

Perl programming language is included by default in most Linux distributions and also in all Mac OS X versions up to day. Windows users need to install it by themselves.

Below, there are some screenshots and some hints for starting to use Perl in Windows.

Find Windows terminal

The easiest way for accessing the terminal in Windows is by typing its name in the launch bar or directly writing CMD. Of course, afterwards, you can decide to make a shortcut link in the desktop or in the Windows bar.

Windows-command-prompt.png

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 to a directory)

Windows-command-prompt-in.png

As reference:

Running Perl

Strawberry Perl adds perl command to Windows System. From that moment, it becomes available from the terminal. Below you can see how a small 'Hello world' script is launches. We also check its content by using more command.

perl hello.pl

Windows-command-prompt-perl.png

Shebang line (the first one of the script and starting with #!), typical of UNIX systems, is ignored in Windows.

Bioinformatics Core Facility @ CRG — 2011-2024