jmanley@metronet.com (Jim Manley) wrote: > a strange problem with the script on pgs 20 - 21. (I've > reproduced the part I'm having trouble with below.) > > print "What is your name? "; > $name = <STDIN>; > chop($name); > if ($name =~ /^jim\b/i) { > print "Hello, Jim! How good of you to be here!\n"; > } else { > > When I run the script without the debugger, it executes the first > print statement properly. When I enter "Jim", the script exits > but does not execute the second print statement. > > If I run the script with the debugger, it runs as expected. > > Anyone have any clues? The code is fine (works flawlessly in perl 4 on a Sun), but I agree that it exhibits the problem you describe under MacPerl 5.05r1m. Actually, it looks like it works correctly the first time, but if you run it again without restarting MacPerl, then only the prompt string is printed, no matter what you type in response. Tom ------------------------------------------------------------------------- W. Thomas Pollard Schrodinger, Inc. pollard@psgvb.com http://www.psgvb.com/ -------------------------------------------------------------------------