Difference between revisions of "Introductory Perl"

From irefindex
(Created page with "This introduction to Perl is taught as part of MBV-INF4410/9410. http://bioinformatics.uio.no/wiki/Bioinformatics_course Slides for the "Introduction to Perl" lectures: * [[Im…")
 
(Made a table out of the list. Added Unix commands.)
Line 8: Line 8:
 
* [[Image:Lecture_2_-_More_What_(Bio)Perl_can_do.ppt]]
 
* [[Image:Lecture_2_-_More_What_(Bio)Perl_can_do.ppt]]
 
* [[Perl_example_code]]
 
* [[Perl_example_code]]
 +
 +
== DOS Commands ==
  
 
You will need to know how to make your way around in a DOS command environment.
 
You will need to know how to make your way around in a DOS command environment.
Line 16: Line 18:
 
Especially these:
 
Especially these:
  
* dir
+
{| cellspacing="0" cellpadding="10" border="1" style="margin: 2em"
* mkdir
+
| dir
* cd
+
| Shows the contents of the current directory (folder)
* copy
+
|-
* move
+
| mkdir ''name''
* del
+
| Makes a new directory called ''name''
* cls
+
|-
* echo %PATH%
+
| cd ''name''
* CTRL+c (Holding down "control" and c will terminate a programme - useful if you have accidentally programmed an infinite loop that you want to stop).
+
| Enters the directory called ''name''
 +
|-
 +
| cd ..
 +
| Goes up and out of the current directory
 +
|-
 +
| copy ''source'' ''target''
 +
| Makes a copy of ''source'' with the name ''target'', or makes a copy of ''source'' with the same name inside a directory called ''target'' (if present)
 +
|-
 +
| move ''source'' ''target''
 +
| Moves ''source'' inside a directory called ''target'' (if present)
 +
|-
 +
| rename ''oldname'' ''newname''
 +
| Renames ''oldname'' to ''newname''
 +
|-
 +
| del ''name''
 +
| Deletes the file called ''name'' (be careful!)
 +
|-
 +
| cls
 +
| Clears the console/terminal
 +
|-
 +
| echo %PATH%
 +
| Shows the list of places where the system looks for programs
 +
|-
 +
| Ctrl+C (holding down Ctrl and C)
 +
| Terminate a program - useful if you have accidentally programmed an infinite loop that you want to stop
 +
|}
 +
 
 +
== Unix Commands ==
 +
 
 +
If you are using GNU/Linux or Mac OS X, you will be using different commands:
 +
 
 +
{| cellspacing="0" cellpadding="10" border="1" style="margin: 2em"
 +
| ls
 +
| Shows the contents of the current directory (folder)
 +
|-
 +
| mkdir ''name''
 +
| Makes a new directory called ''name''
 +
|-
 +
| cd ''name''
 +
| Enters the directory called ''name''
 +
|-
 +
| cd ..
 +
| Goes up and out of the current directory
 +
|-
 +
| cd
 +
| Goes to your home directory
 +
|-
 +
| cp ''source'' ''target''
 +
| Makes a copy of ''source'' with the name ''target'', or makes a copy of ''source'' with the same name inside a directory called ''target'' (if present)
 +
|-
 +
| mv ''source'' ''target''
 +
| Renames ''source'' to ''target'', or moves ''source'' inside a directory called ''target'' (if present)
 +
|-
 +
| rm ''name''
 +
| Deletes the file called ''name'' (be careful!)
 +
|-
 +
| clear
 +
| Clears the console/terminal
 +
|-
 +
| echo $PATH
 +
| Shows the list of places where the system looks for programs
 +
|-
 +
| Ctrl+C (holding down Ctrl and C)
 +
| Terminate a program - useful if you have accidentally programmed an infinite loop that you want to stop
 +
|}

Revision as of 17:19, 21 November 2011

This introduction to Perl is taught as part of MBV-INF4410/9410.

http://bioinformatics.uio.no/wiki/Bioinformatics_course

Slides for the "Introduction to Perl" lectures:

DOS Commands

You will need to know how to make your way around in a DOS command environment. Useful sites that may be useful to read before/during the exercises are:

Especially these:

dir Shows the contents of the current directory (folder)
mkdir name Makes a new directory called name
cd name Enters the directory called name
cd .. Goes up and out of the current directory
copy source target Makes a copy of source with the name target, or makes a copy of source with the same name inside a directory called target (if present)
move source target Moves source inside a directory called target (if present)
rename oldname newname Renames oldname to newname
del name Deletes the file called name (be careful!)
cls Clears the console/terminal
echo %PATH% Shows the list of places where the system looks for programs
Ctrl+C (holding down Ctrl and C) Terminate a program - useful if you have accidentally programmed an infinite loop that you want to stop

Unix Commands

If you are using GNU/Linux or Mac OS X, you will be using different commands:

ls Shows the contents of the current directory (folder)
mkdir name Makes a new directory called name
cd name Enters the directory called name
cd .. Goes up and out of the current directory
cd Goes to your home directory
cp source target Makes a copy of source with the name target, or makes a copy of source with the same name inside a directory called target (if present)
mv source target Renames source to target, or moves source inside a directory called target (if present)
rm name Deletes the file called name (be careful!)
clear Clears the console/terminal
echo $PATH Shows the list of places where the system looks for programs
Ctrl+C (holding down Ctrl and C) Terminate a program - useful if you have accidentally programmed an infinite loop that you want to stop