Inside an embperl block you print to OUT.
print OUT "$foo \\\<BR\\>\n";
I've escaped the < and >. Also see $optRawInput and $escmode.
Phil
-----Original Message-----
From: Andre Landwehr [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 08, 2000 3:01 AM
To: [EMAIL PROTECTED]
Subject: Re: [embperl] next within meta command causes crash
On Sat, Oct 07, 2000 at 06:59:51PM -0400, Ilia Lobsanov wrote:
> Anyone notice a crash with this little test script:
>
> [-
> @bar = ('a', 'blah', 'c');
> -]
> [$ foreach $foo @bar $]
> [- next if $foo eq 'blah' -]
> [+ $foo +]<BR>
> [$ endforeach $]
>
> ilia.
>
I can confirm it crashes. It cannot work because the meta command
"foreach" is not the same as the perl command "foreach", so you
cannot use "next" with it. Nevertheless I agree with you that
Apache should not segfault because of this...
However, you may use the following:
[-
@bar = ('a', 'blah', 'c');
foreach $foo (@bar) {
next if $foo eq 'blah';
print "$foo<BR>";
}
-]
Andre
--
/"\
\ /
X ASCII Ribbon campaign against HTML E-Mail
/ \
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]