in reply to Optimizing Perl Code - single versus double quotes really that important?
It's about my performance. If I see double quotes and no variable, I wonder what I was planning to interpolate that isn't in the code now. If I see single quotes and a variable, I wonder for a moment why I didn't use double quotes or qq(). Parsing within the constructs is different, and I try to use the one that gives me the desired behavior. In cases in which there's no difference in final behavior, I tend to opt for single quotes just out of consistency. In my code as a rule, interpolating constructs are only used to interpolate something. The types of bugs that helps me avoid are small and simple to fix, but I've found they are quite common if I don't use the rule.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Optimizing Perl Code - single versus double quotes really that important?
by ruzam (Curate) on Feb 05, 2009 at 18:56 UTC |