in reply to Re^3: Need a solution to Expect.pm 's single line regex matching limitation
in thread Need a solution to Expect.pm 's single line regex matching limitation
Thanks a lot for the response.
You were instrumental in understanding me the working
You saved my day!!! :)
Could you please put some light on how did you managed to get only a single instance of the answers in your run that we are sending to the installation script?
I am getting either 3 (when ran your script as is) or none (when I have: $expObj->raw_pty(1)).
Sample output:
bash-3.00# ./installPerl.pl So we are poing to install The Best All-Purpose Compiler ever. It groks perl, java, c#, haskell, forth and lisp and many more all at the same time. Big deal.
# ========= 3 instances in OUTPUT BELOW =========
Path for package: /foo/bar/quux /foo/bar/quux /foo/bar/quux you said: '/foo/bar/quux', good. We'll come back to that. We want some sensitive information from you to harrass you on every IRC channel in which you talk bad of our product. Yes, we monitor them all. What is your nick? shmem shmem shmem you said: 'shmem', good. We'll come back to that. The next abomination is optional. PLEASE think again if you are inclined to install support for that cruft. do you want Visual Basic support? NO! NO! NO! you said: 'NO!', good. We'll come back to that. Thank you for using The Great Foo. All done. bash-3.00#
Code showing no instances of the answers:
modified this single line in install.pl:
to include a newline character as:print "you said: '$foo', good. We'll come back to that.\n";
print "\nyou said: '$foo', good. We'll come back to that.\n";
Sample run:
----------------------------------------
bash-3.00# ./installPL.pl So we are poing to install The Best All-Purpose Compiler ever. It groks perl, java, c#, haskell, forth and lisp and many more all at the same time. Big deal.
# ========= NO instances in OUTPUT BELOW =========
Regards,Path for package: you said: '/foo/bar/quux', good. We'll come back to that. We want some sensitive information from you to harrass you on every IRC channel in which you talk bad of our product. Yes, we monitor them all. What is your nick? you said: 'shmem', good. We'll come back to that. The next abomination is optional. PLEASE think again if you are inclined to install support for that cruft. do you want Visual Basic support? you said: 'NO!', good. We'll come back to that. Thank you for using The Great Foo. All done. bash-3.00#
|
|---|