SPUG: Control Z doesn't work either

Neko tgy at chocobo.org
Tue Feb 29 11:50:33 CST 2000


On Mon, 28 Feb 2000, Matthew Lasar wrote:

> I've been sitting around this evening having a very frustrating time. This
> program, which I've beening running on Windows 95 via the DOS prompt, comes
> with instructions from "Leaning Perl" that I should enter my lines and then
> hit control-D. A friend explained that that's a unix command, and that for
> DOS I should use control-Z  But that isn't actually working either. I enter
> some strings. I hit control Z, then return, and I get nothing, a blank
> line. Even "answer" doesn't print.

The problem may be that Win/Dos thinks control-Z means "discard the first
line" among other things:

C:\>perl -e "print <>"
a
b
c
d
^Z
b
c
d

You can get around this by outputting an extraneous initial newline:

C:\>perl -e "print qq/\n/, <>"
a
b
c
d
^Z
a
b
c
d


-- 
Neko


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list