On Fri, Feb 16, 2001 at 08:39:26AM -0800, Wim Kerkhoff wrote:
> Good morning/afternoon,
>
> I've been trying to get a simple read from a pipe to work, but its not
> doing what I'm intending. I'm using EmbperlObject ('cuz it rocks), but
> get the same thing in just regular Embperl mode. My base.html is
> extremely simple: just the look and a Execute('*') call.
>
> So, Uptime 2 works below, but not Uptime 1 and Uptime 3. What am I
> doing wrong? It's gotta be something simple...
>
>
> --------------------------------
> Uptime 1:
>
> [- open (UP, "uptime |") -]
>
> [$ while ($line = (<UP>)) $]
> <b>[+ $line +]</b>
> [$ endwhile $]
>
> [- close (UP) -]
>
> <br><br>
> Uptime 2: [+ `uptime` +]
>
> <br><br>
> Uptime 3:
> [-
> open (F, "uptime |");
> while (<F>) {
> print OUT $_;
> }
> close (F);
> -]
>
I would try to quote the "<"s in the perl code sections (i.e. "\<UP>",
etc.), at least that's what I usually do in these situations.
There may be a way to achieve the same effect via configuration options
(optRawInput,...(?)), I haven't yet figured out how to make that work
as advertised in the docs, though... (may be someone else can shed some
light on that :)
Erdmut
--
Erdmut Pfeifer
science+computing gmbh
-- Bugs come in through open windows. Keep Windows shut! --
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]