in reply to Re: Hash Syntax Question
in thread Hash Syntax Question
No difference except for the one you mentioned. single and double-quoted strings both result in the same object except for the variable interpolation and related character escape rules.
In theory, if you don't need interpolation, using single quotes could compile a tiny bit faster, but a) perl compiles blazingly fast compared to most languages, and b) the time needed to analyze a quoted string is probably dwarfed by the time needed to load the perl interpreter and the rest of the code. Don't worry about it.
Also, using double-quotes makes it slightly easier to insert variables into the string later, which is why i generally prefer to use double-quoted strings for all literals that don't contain a lot of "meta" characters.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Hash Syntax Question
by FunkyMonk (Chancellor) on Jul 25, 2007 at 21:35 UTC | |
by Joost (Canon) on Jul 25, 2007 at 21:48 UTC |
In Section
Seekers of Perl Wisdom