in reply to Re: Learn Unix multiline syntax
in thread Learn Unix multiline syntax
To clarify: the shell has its own way of handling “$whatever”: it substitutes an environment-variable. But if you are assembling a double-quoted string, and perhaps in other situations also, “Perl gets there first,” and substitutes a Perl variable (or nothing). There are various ways to avoid this behavior, including the use of \$ (which means, “the literal character, ‘$’”). Hence, I stand by the admonition to “first, just print it out.” It is a (very easy!) waste of time to try to figure out why a string is not being interpreted correctly, only to discover (too late!) that the string does not actually contain what you thought it would.
(Let’s ask the Peanut Gallery here: Will everyone who has done exactly this, please raise your hands?” :-D I rest my case. (And lower my hand.)