[Omaha.pm] q{} is your friend. shell escaping is not :)

Sterling Hanenkamp sterling at hanenkamp.com
Thu Feb 4 11:18:33 PST 2010


On Thu, Feb 4, 2010 at 10:57 AM, Jay Hannah <jay at jays.net> wrote:

> On Feb 4, 2010, at 9:58 AM, Todd Christopher Hamilton wrote:
> > I was wondering something though.  Which one would you do?:
>
>
I don't like heredocs. That's mostly simple prejudice. I just don't like
them. However, when I rarely use them,

1) I always specify the quoting. That is, always <<"EOF" or <<'EOF' rather
than <<EOF. It makes what I'm doing more explicit.

2) I never use a generic short "EOF" that's too likely to appear somewhere
in any given text. Instead, I use something like "END_OF_BAR_SQL"

In general, though. I almost always use multi-line q[] or qq[] or q() or
qq() or q{} or qq{} etc.

-- 
Andrew Sterling Hanenkamp
sterling at hanenkamp.com
785.370.4454
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20100204/8930d3eb/attachment.html>


More information about the Omaha-pm mailing list