Still in my formative Perl years, I've had difficulty understanding and knowing when to use single quotes around a variable and when to use double quotes. I finally took the time today to experiment with the concept to be able to learn it truly. In so doing, one of my co-workers (cerberus) and I came up with a little mnemonic or nursery rhyme to be able to remember when to use which. So, here it is for your benefit and enjoyment:
One quote is Numeric, But Double does for Both.
Well, let me know what you think. Hopefully we're not missing the point on interpolating--otherwise this will be quite an embarassing posting.
That's Spenser, with an "s" like the detective.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interpolating Nursery Rhyme
by YuckFoo (Abbot) on Apr 25, 2002 at 16:56 UTC | |
|
Re: Interpolating Nursery Rhyme
by stephen (Priest) on Apr 25, 2002 at 16:25 UTC | |
|
Re: Interpolating Nursery Rhyme
by hatter (Pilgrim) on Apr 27, 2002 at 21:32 UTC |