[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



On Thu, Feb 4, 2010 at 10:57 AM, Jay Hannah <jay@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@hanenkamp.com
785.370.4454