in reply to here documents formatting
when, as you are recognizing, needs to bewhile () { print <<END; my text END }
While you can modify the here document starting point, such aswhile () { print <<END; my text END }
where that space is a tab character, this would look worse.print << END;
I've run into the same problem, and for things like sql statements, I find it better to use q() and friends, such as:
The indents in this code will rarely affect SQL, and probably only a few select other cases will it be a problem.$sth=$dbi->prepare( q/ SELECT * FROM my_table WHERE AVERAGE( cost ) < ? /) or die DBI->errstr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: here documents formatting
by the_0ne (Pilgrim) on Apr 07, 2001 at 04:46 UTC |