On Wed, 7 Jan 2004, Uri Guttman wrote:
> >>>>> "W" == Wk0007 <[EMAIL PROTECTED]> writes:
>
> W> my $q_delete_old_data = qq{DELETE DATA_TM
> W> WHERE EXP_ID = $exp_id};
> W> my $sth_delete_old_data = $dbh->prepare_cached($q_delete_old_data);
>
> those var names are way too long since they live in such a small
> scope. also why even have the temp var for the query text? and i like
> here docs for those:
>
> my $sth = $dbh->prepare_cached( <<SQL ) ;
> DELETE DATA_TM WHERE EXP_ID = $exp_id
> SQL
>
> with here docs you can format the SQL for readability (nice if you also
> log/print it).
On the other hand, the qq{} format can also be formatted for readability,
and it doesn't have the quirky start & end syntax:
my $sth = qq{
DELETE DATA_TM
WHERE EXP_ID = $exp_id
};
The fact that the quote terminator doesn't need to be flush with the left
margin is IMO a big improvement over heredocs.
This isn't Bourne shell, you can use something nicer than heredocs :)
--
Chris Devers
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm