Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Gerrit P. Haase" Organization: Esse keine toten Tiere To: cygwin AT cygwin DOT com Date: Mon, 18 Dec 2000 13:14:13 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: stdin/stdout with perl not o.k Reply-to: gerrit DOT haase AT t-online DOT de Message-ID: <3A3E0DA5.5525.1E1BB716@localhost> X-mailer: Pegasus Mail for Win32 (v3.12cDE) Hi there, if i run this perl-script, i get no Output before i made an input at STDIN. The same in C is o.k. Anyone able to test it, because i don't know, whether it is a problem with my cygwin installation, with my perl installation or a problem with cygwin itself? Thanks! #!/usr/local/bin/perl # iocheck.pl print "Are you o.k?[yes/no] "; $input = ; chomp $input; if ($input eq 'yes') { print "\nfine...\n"; } else { print "\nohhh...\n"; } OUTPUT: $ io-check.pl yes Are you o.k?[yes/no] fine... ========================================= The same in C is o.k. ========================================= /* *IO-check */ #include int main(void) { char ask[5]; int i; printf("\nAre you ok?[yes/no] "); gets(ask); printf("\n"); for (i=0;ask[i];i++) { if (ask[i]=='y') { puts("fine...\n"); } else if (ask[i]=='n') { puts("ohhh...\n"); } } return 0; } OUTPUT: $ iocheck.exe Are you ok?[yes/no] yes fine... -- =^..^= Gerrit Peter Haase -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple