[vienna.pm] Schönere Here-Documents

Peter J . Holzer hjp at wsr.ac.at
Fri Aug 11 04:09:24 CDT 2000

Gerade auf dbi-users gesehen. Ist zwar nicht überall einsetzbar (SQL
stören extra-Blanks nicht, aber wenn man z.B. schön formatiertes HTML
erzeugen will, geht das nicht), und auch nicht besonders robust (wie
leicht löscht man versehentlich die "unnötige" Leerzeile), aber schaut
hübsch aus.

----- Forwarded message from Phil R Lawrence <prlawrence at lehigh.edu> -----

From: "Phil R Lawrence" <prlawrence at lehigh.edu>
To: <dbi-users at isc.org>
Subject: Re: best way of Passing CGI parameters to a SQL querry
Date: Thu, 10 Aug 2000 16:56:09 -0400

> ## I too much prefer using qq instead of heredoc because of line
> ## indentation
I didn't like heredocs either because of the dumb TOKEN that had to break my
beautiful indentations.  Then I saw someone do this:
    my $sql = <<"";

Then all you need is a blank line after your SQL statement and your
indentations remain unmolested.
            my $sql = <<'';
                SELECT foo
                  FROM bar


Phil R Lawrence

DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/
To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html
If you are without web access, or if you are having trouble with the web page, 
please send mail to dbi-users-request at isc.org with the subject line of:

----- End forwarded message -----

   _  | Peter J. Holzer      | 1980: If it's worth implementing once,
|_|_) | Sysadmin WSR / LUGA  |       it's worth implementing twice.
| |   | hjp at wsr.ac.at        | 1990: Ship the prototype!
__/   | http://www.hjp.at/   | 2000: Ship the idea!      -- Larry Rosler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 371 bytes
Desc: not available
Url : http://mail.pm.org/archives/vienna-pm/attachments/20000811/08aa627c/attachment.bin

More information about the Vienna-pm mailing list