If I have a variable that I populated by cutting apart a string, and I know that the variable is a number, can I do simple math on it?
$Variable = "Number10";
$OtherVar = substr($Variable, 7);
$OtherVar = $OtherVar + 1;
and now $OtherVar = 11?
Is there a way to write to a specific spot in a text file? What I mean is this. If i iterate through a file until I reach the desired line number can I insert a new line in that spot that overwrites the old line?
Also, is string concatenation the same as in most languages?
$String1 = $String1 + $String2 + "characters";
I appreciate your help.
There are 3 Types of People in the World
Those Born to Think Logically
Those that can Learn to Think Logically
Those that Shouldn't Try
$Variable = "Number10";
$OtherVar = substr($Variable, 7);
$OtherVar = $OtherVar + 1;
and now $OtherVar = 11?
Is there a way to write to a specific spot in a text file? What I mean is this. If i iterate through a file until I reach the desired line number can I insert a new line in that spot that overwrites the old line?
Also, is string concatenation the same as in most languages?
$String1 = $String1 + $String2 + "characters";
I appreciate your help.
There are 3 Types of People in the World
Those Born to Think Logically
Those that can Learn to Think Logically
Those that Shouldn't Try