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

Andy Lester andy at petdance.com
Thu Feb 4 08:20:51 PST 2010


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 at petdance.com => www.theworkinggeek.com => AIM:petdance






More information about the Omaha-pm mailing list