On Nov 5, 2:38 am, [EMAIL PROTECTED] (Robert Locke) wrote: > Hi, > > Please look at my short code and tell me where I go wrong. > I though a read from STDIO should make the execution stop, > wait for some input and a return, but my code just continues. > > sub user_choice { > (my $list) = @_; > > # Some foreach functionality on the list items ... > print "Give me a command:\n"; > my $command = <STDIN>; # Shouldn't it stop here and wait for input??? > chop $command; # this gives "Use of uninitialized value in scalar chop at > ./script.pl line 70." > > # The script just continues??? > > }
How are you running the script? By any chance are you piping some other command to it, or providing input redirection on the shell? What is the actual command you type at the command line to execute this program? Paul Lalli -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/