On Thu, 29 Dec 2005, Poonam Pahil wrote: > if($remove_CS =~ m/n/i ){ ??? } > it does not reach to this point. > > it hangs before this, at > my $remove_CS = <STDIN>; > >
Well this works for me ------------------------cut---------------------------- #!/usr/bin/perl -w use strict; print "Do you want to remove this CSpec(y/n):"; my $remove_CS = <STDIN>; chop($remove_CS); if($remove_CS =~ m/n/i ){print "\n\n OK - will not remove\n"} else {print "\n\n OK - will remove\n"} ------------------------cut---------------------------- [EMAIL PROTECTED]:~/Perlscripts$ perl -c stdin.pl stdin.pl syntax OK [EMAIL PROTECTED]:~/Perlscripts$ perl stdin.pl Do you want to remove this CSpec(y/n):n OK - will not remove [EMAIL PROTECTED]:~/Perlscripts$ perl stdin.pl Do you want to remove this CSpec(y/n):y OK - will remove [EMAIL PROTECTED]:~/Perlscripts$ Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>