Escaping strings in Bash using !:q
If only more languages supported quote operators like Perl.  They really do make certain things like this so much easier.Non interpolating quotes:  q/I wasn't surprised when he said "boo" and game me $5/;
  q@I wasn't surprised when he said "boo" and game me $5@;
  q!I wasn't surprised when he said "boo" and game me $5!;
  q(I wasn't surprised when he said "boo" and game me $5);
  q[I wasn't surprised when he said "boo" and game me $5];

Interpolating quotes:  qq/Hello, $name!/;
  qq!Hello, $name\!!;
  qq@Hello, $name!@;
  qq(Hello, $name!);
  qq[Hello, $name!];
  qq'Hello, $name!';

Rule of thumb, single q for single quote string (non-interpolating normally), and two q's for a double quote string (normally interpolates).