.------[ Gajo Csaba wrote (2002/10/31 at 20:19:43) ]------
|
| While I'm at silly questions, I guess I could ask this one
| too: what is the difference between a " " and a ' '. I have
| a book that explains it to me in one sentence, and I don't
| understand one word that the author's using (I suck at
| English), so could someone explain it to me? An example
| would be nice too :)
|
`-------------------------------------------------
Basically it is to parse, or not to parse. :)
If we have a scalar variable called $foo which is defined as:
my $foo = 'is really cool.';
And we want to print it out using both methods as such:
print "1 -- This $foo\n";
print '2 -- This $foo\n';
Will produce the following:
1 -- This is really cool.
2 -- This $foo\n
If you have variables or special characters ( i.e. \n, \t, etc )
in a string enclosed by ""s then they will be replaced with their
values. If you have them enclosed in ''s they will be used
literally.
Hope that helps.
---------------------------------
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
---------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]