I can't speak for others, but here are a couple of the benefits I see.
- Less escaping necessary. q{brace {fun}} does what I want. I can say q{"quote" 'fun'} too. You do need to escape braces in a q{} if they're unbalanced, but otherwise it just works.
- It stands out a little more for small expressions (q{} vs '').
- Even if I don't have to escape anything now, I might have to later. If I code with q{} today, it saves me having to change to it later.
- Likewise, it's easier to go from q{} to qq{} than it is to go from '' to "" if my interpolation behavior needs to change.
| [reply] [d/l] [select] |
OK - I understand. Something akin to the philosophy of always including a dangling comma in a list declaration - easy to add elements later without error, etc.
| [reply] |
...what's up with the propensity of perl gurus to use qq{} and q{} so much when plain old '' or "" would do?
I think it's mainly a scaling thing – unless your list contains only one or two items, qq{} will save your fingers a bunch of trips to the [Shift] and ['] keys.
Sorry, misread the question in my haste. Please disregard.
| [reply] |