Marlon,

Thanks, I'd not considered that. I was just doing some preliminary I/O
research and testing to broaden my knowledge of some of the bits 'n bytes of
Perl, I wasn't planning on anything as fancy as an automated telnet session.
However, now that you've raised the idea....<g>

Still, there has to be something very simple which I'm not doing which puts
the prompt back on my Linux server monitor after I've squirted a message to
it.

John--

-----Original Message-----
From: Marlon Jackson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 12:59 PM
To: [EMAIL PROTECTED]
Subject: RE: xmit Perl code for carriage return during telnet session


If you're trying to automate a console session, you may consider using the
Expect perl module. I haven't used every function, but the expect and send
functions seem to work well and that's usually all you need. Keeps me from
having to use tcl ;-)

> -----Original Message-----
> From: John [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 17, 2002 10:13 PM
> To: [EMAIL PROTECTED]
> Subject: RE: xmit Perl code for carriage return during telnet session
>
>
> Daniel,
>
> Thanks for the suggestion, but I'd already tried that
> variation-on-a-theme
> with no luck.
>
> I'm really looking for the right code to have telnet execute
> an Enter key
> function at the finish of my perl script.
>
> John--
>
> -----Original Message-----
> From: Daniel Gardner [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 18, 2002 12:45 AM
> To: John
> Cc: [EMAIL PROTECTED]
> Subject: Re: xmit Perl code for carriage return during telnet session
>
>
> Hello John,
>
> Monday, March 18, 2002, 5:15:18 AM, John wrote:
>
>
> > I do not understand the results of the following
> experiment, and would
> > appreciate input.
>
> > Using telnet on a Win PC, I executed this code:
>
> >         perl -e ‘print "Hello world.\n\r"' > /dev/tty1
>
> > On my Linux system monitor (/dev/tty1), I see "Hello
> world." printed along
> > with the newline and carriage return.
>
> > What I don't understand is why I don't see a return of my
> Linux screen
> > prompt until I hit the Enter key on that system.
>
> > Should I be flushing some sort of buffer, closing a file,
> or transmitting
> > some other code sequence to indicate an end to my output?
>
> try without the \r
>
> \n is a "newline", \r a "carriage return", in windows files
> you usually need both, on unix you usually only need the
> newline.
>
> the \r in this case will move the cursor back to the start
> of the line, overwriting the prompt which is there.
>
>
> --
> Best Regards,
> Daniel                   [EMAIL PROTECTED]
>
>
>


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to