codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  problem with STDIN func.  dloksh at 14:29 on Wednesday, August 08, 2007
 

i wrote a simple script wihth STDIN function but when i try to stop the input in cmd using Ctrl + Z command i cant.
so to stop it completly i have to pound "\" and then Ctrl + z, which completly stops the program.

how can it be fixed or is there another way to break the operation/

<Added>

i'm runnig win xp home edition

  Re: problem with STDIN func.  skalyanraj at 09:50 on Thursday, January 17, 2008
 

Put your code in the script to exit from the program...like
[code]
while (<STDIN>) {
chomp;
exit if ($_ =~ m/quit/);
[/code]

<Added>

[code]
while (<STDIN>) {
chomp;
exit if ($_ =~ m/quit/);
}
[/code]








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: adding a single \ to text
•  Re: problem with STDIN func.
•  Re: Problem with concatenation
•  facing problem in enabling a check box
•  connecting to Data.SqlClient
•  Re: display an image held in a sql database (image datatype) in to a datalist
•  I NEED C++ FOR PCSX2
•  download files via http in perl
•  Re: Help: Trouble with z-Index and SELECT lists


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008