S
sln
PES> Sorry for the noobish questions, but I am used to C and Delphi
PES> Pascal, where I am familiar with the syntax.
It's not the syntax you're having trouble with, it's the semantics.
Perl doesn't have strongly typed variables the way the languages you
insist on comparing it with do.
A scalar holds one data value, such as a string or a number. If you
treat a scalar as if it has a number in it, Perl will do its best to
interpret that scalar as a number. If you treat a scalar as if it has a
string in it, Perl will do its best to interpret that scalar as a
string.
So yes, you can say $x = "57"; and Perl will dutifully put the string
"57" into $x. Then, when you say $y = $x + 7; Perl will interpret $x as
if it contains a number and add 7 to it. And then, when you say print
$y; -- well, Perl will convert $y to a string to print it for you.
Charlton
Total confusion. A vaiable contains a value that is typed. How you
use it depends on its TYPE not visa versa. Don't go down that road
with a C person.
Do give C people credit for knowing what a Union is. Because, that
is what Perl uses.
You obviously, never, ever, programed in a structured language.
If you did, describe Perl's actual usage to somebody who has.
And don't sugar coat, and lay off beginner crap, superiority shit
you and others keep foaming about via insinuation.
And since PERL is actually written upon C, try to learn it.
I realize you don't know C/C++, or structured language, but
try to make it sound like you do, at least.
-sln