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

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




On Feb 4, 2010, at 9:58 AM, Todd Christopher Hamilton wrote:

I like goffy_b because I don't have to have the EOF terminator in column 1 but I think PerCritic complains about using q{} over multiple lines.


Heredocs have the benefit of being much easier to cut & paste into other places, whether from the editor or from the terminal. I used it always for all SQL, certainly.

Also, with $x = q{\n....\n}, you get the leading \n, whereas with heredocs you don't.

xoxo,
Andy

--
Andy Lester => andy@petdance.com => www.theworkinggeek.com => AIM:petdance