in reply to Execute Interactive commands
You are presumably trying to do this using `backtics`. Bacticks capture the scripts output into a variable. In fact the "hang" is the program you are running waiting patiently for your input (with the prompt captured by the backtics):
C:\>perl -e "print 'Hello '; system('date'); print 'world'"; Hello The current date is: Tue 17/06/2008 Enter the new date: (dd-mm-yy) 17-06-08 world C:\> C:\>perl -e "print 'Hello '; `date`; print 'world'"; Hello 18-06-08 <--- type in data here world C:\>date The current date is: Wed 18/06/2008 [snip] C:\>perl -e "print 'Hello '; $p = `date`; print $p.' world'"; Hello 17-08-08 The current date is: Tue 17/06/2008 Enter the new date: (dd-mm-yy) world C:\>
|
|---|