Numeric and String variable operations (Perl)
Numeric Variable operations
Increment: $num++;
Decrement: $num--;
Add $b to $a: $a += $b;
Subtract $b from $a: $a -= $b;\
String Variable operations
Put two strings together: $a = $b . $c;
Append to variable: $d .= "appended text";
- These can be used within a string:
"\\Lall text is lowercase"Or just before a variable:\\U$varisuppercase - Set first character to be uppercase:
$firstinuppercase = ucfirst($lowercasetext);\