On 4/27/07, Dave Adams <[EMAIL PROTECTED]> wrote:

Today I learned something about XML::Writer where I was using single quotes
instead of double quotes and it caused me all sorts of problems later in the
script.

That can happen. But I can't find it happening anywhere in the code you posted.

A single quoted string is just syntax for a literal string. But double
quoted strings in Perl may be more than just literal strings; they can
implicitly invoke join() or concatenation, for example. Still, in the
code you posted, your strings are merely string literals, with no
interpolation going on. Single quotes would have worked as well.

Sometimes, people have the idea that 'fred' is a different string than
"fred". But they're analogous to writing 255.0 versus 255.00000; even
though they look different to human eyes, they mean the same to Perl.

Maybe the quote marks made a difference in another program, such as a
text editor? Or maybe you fixed a missing quote mark when you changed
from singles to doubles? In any case, I'm glad that you were
successful.

Cheers!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to