strange problem with STDIN- need help



Hi,

Iam using <STDIN> to accept user input but the script just hangs at that
point.
I type in the value & program is just stuck at that point.

i know its got to do with buffer flushing. when iam using the same piece of
code at the beginning of the script everything works fine.

iam using system() a lot. directing input/output to/from files. can this be
the reason.

This is the piece of code:

print "Do you want to remove this CSpec(y/n):";
my $remove_CS = <STDIN>;
chop($remove_CS);
if($remove_CS =~ m/n/i )

Thanks & Regards
Poonam


Relevant Pages

  • Re: strange problem with STDIN- need help
    ... i was undefining $/ .I wanted to use slurping technique.i.e reading in a ... > Try adding this line to the top of your script: ... > i know its got to do with buffer flushing. ... when iam using the same piece ...
    (perl.beginners)
  • Re: strange problem with STDIN- need help
    ... > Iam using to accept user input but the script just hangs at that ... > code at the beginning of the script everything works fine. ...
    (perl.beginners)
  • Re: How can I run .sql script from vc++
    ... I have an 'Insert.sql' script in my source directory. ... On that Sql ... file,Iam trying to insert a value to a table. ... MFC with MySQL as backend. ...
    (microsoft.public.vc.language)
  • Re: Startup Script
    ... Well, even though i am not sure, may be i can suggest a immediate workaround. ... why don't you extract a startup script from the most near/recent rpm below, your current bind version, and do the modification. ... Also after this workaround look at whether each and every individual files mentioned in the script is present. ... Iam trying to install the DNS Server on RHEL4. ...
    (RedHat)
  • Re: help Data dirven script
    ... Manjula Gowda wrote: ... Iam trying to a write a script to test one login screen. ... "very urgent"? ...
    (perl.beginners)