Perl conti.....
From DrugPedia: A Wikipedia for Drug discovery
(New page: '''Arithmetic Operators:''' Arithmetic operators are symbols used to execute general arithmetic procedures including: addition (+), subtraction (-), multiplication (*), and division (/). ...) |
|||
(4 intermediate revisions not shown.) | |||
Line 3: | Line 3: | ||
Arithmetic operators are symbols used to execute general arithmetic procedures including: addition (+), subtraction (-), multiplication (*), and division (/). | Arithmetic operators are symbols used to execute general arithmetic procedures including: addition (+), subtraction (-), multiplication (*), and division (/). | ||
- | + | 7 + 7 = 14 Addition | |
- | + | 7 - 7 = 0 Subtraction | |
- | + | 7 * 7 = 49 Multiplication | |
- | + | 7 / 7 = 1 Division | |
- | + | 7 ** 7 = 823543 Exponents | |
- | + | 7 % 7 = 0 Modulus | |
'''PERL - Assignment Operators''' | '''PERL - Assignment Operators''' | ||
- | + | Addition ($x += 10) | |
- | + | Subtraction ($x -= 10) | |
- | + | Multiplication ($x *= 10) | |
- | + | Division ($x /= 10) | |
- | + | Modulus ($x %= 10) | |
- | + | Exponent ($x **= 10) | |
'''PERL - Logical & Relational Operators''' | '''PERL - Logical & Relational Operators''' | ||
Line 35: | Line 35: | ||
Logical operators state and/or relationships. Meaning, you can take two variables and test an either or conditional. Logical operators are used later on in conditionals and loops. For now, just be able to recognize them in the upcoming examples. | Logical operators state and/or relationships. Meaning, you can take two variables and test an either or conditional. Logical operators are used later on in conditionals and loops. For now, just be able to recognize them in the upcoming examples. | ||
- | ==,eq 5 == 5 | + | ==, eq 5 == 5 |
- | 5 eq 5 Test: Is 5 equal to 5? True | + | 5 eq 5 Test: Is 5 equal to 5? True |
Current revision
Arithmetic Operators:
Arithmetic operators are symbols used to execute general arithmetic procedures including: addition (+), subtraction (-), multiplication (*), and division (/).
7 + 7 = 14 Addition
7 - 7 = 0 Subtraction
7 * 7 = 49 Multiplication
7 / 7 = 1 Division
7 ** 7 = 823543 Exponents
7 % 7 = 0 Modulus
PERL - Assignment Operators
Addition ($x += 10)
Subtraction ($x -= 10)
Multiplication ($x *= 10)
Division ($x /= 10)
Modulus ($x %= 10)
Exponent ($x **= 10)
PERL - Logical & Relational Operators
Relationship operators compare one variable to another. (5 < 12) They are used to compare equality or inequality of two or more variables, be it a string or numeric data.
Logical operators state and/or relationships. Meaning, you can take two variables and test an either or conditional. Logical operators are used later on in conditionals and loops. For now, just be able to recognize them in the upcoming examples.
==, eq 5 == 5
5 eq 5 Test: Is 5 equal to 5? True