[prev] [thread] [next] [lurker] [Date index for 2006/12/17]
On Sun, 17 Dec 2006 12:42:41 +0000, "Earle Martin" <hates-software@xxxxxxxx.xxx> wrote: > On 17/12/06, H.Merijn Brand <h.m.brand@xxxxxx.xx> wrote: > > my $sth = $dbh->prepare (qq; > > select foo, bar > > from baz > > where duh = ?; > > ); > > > > Now you can cut-n-paste the statement and run in SQL :) > > And it reads nice too > > That's a little hacky for my tastes. Most hates are about taste, aren't they > my $sth = $dbh->prepare(<<'END_SQL'); > select foo, bar > from baz > where duh = ?; > END_SQL 1. It is not the same, as now the semi-colon is included in the statement 2. It's ugly layout-wise, as END_SQL has to be on the start of the line and ruins the visual layout of the script -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11, & 11.23, SuSE 10.0 & 10.1, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org http://mirrors.develooper.com/hpux/ http://www.test-smoke.org http://www.goldmark.org/jeff/stupid-disclaimers/
Generated at 22:02 on 27 Dec 2006 by mariachi 0.52