On Sat, Feb 23, 2002 at 04:42:16PM +0100, Gerald Richter wrote:
> >
> > If I take the data that is input on the form and on the next page output
> it
> > again, it shows up as spaces where I pressed Enter.
> >
>
> The cr's are preseverd, but if you output a newline in html text, nothing
> happens
I tried both with brackets and without, the same result :(
If i try this...
[$ foreach $row @$result $]
[+ $row +]
[$ endforech $]
... the only output is a '0', there should be an ARRAY ref there.
btw, I'm using on embperl 1.3.4
/Christian
- Original Message -
From: "Gavin Carr"
>
> @$result is the result of a database query using DBI with
> selectall_arraryref()
>
Normaly both should work. Which version of Embperl do you using? Does it
change anything if you make ( ) around the @$result in the second example?
Gerald
---
Could someone explain to me why this works...
[-
foreach $row (@$result) {
print OUT "$row->[1]";
}
-]
.. and this doesn't?
[$ foreach $row @$result $]
[+ $row->[1] +]
[$ endsub $]
@$result is the result of a database query using DBI with
selectall_arraryref()
/Christian
-