S
socrtwo
Guest
returns from the keyboard? This is a cross post from my question in Mahalo Answers and Google Perl Beginners Group.
I am using the executable cakecmd unzipper in a Perl script. Normally when cakcmd is executed outside of Perl and it's done it's work it pauses and one has to hit enter to return to the prompt.
How can I program Perl so that it enters the carriage return for me? Printing a carriage return doesn't work, it just adds an additional line between prompts. At this point I call cakecmd twice, and so to complete my script I have to hit the Enter key twice within my Windows CMD console.
I got a promising response from Perl Beginners Google Group that suggest I use the CPAN Perl Module called Expect, however I am unclear how to use it. How can I tell Perl to use Expect, to look for a no time limit pause and then execute a carriage return?
Thanks
Thanks for the first answer. It doesn't work using either the system or the exec function. The system function gives me errors, the exec works but still has the same pauses requiring carriage returns. The parameter < ^M, doesn't seem to make a difference.
I am using the executable cakecmd unzipper in a Perl script. Normally when cakcmd is executed outside of Perl and it's done it's work it pauses and one has to hit enter to return to the prompt.
How can I program Perl so that it enters the carriage return for me? Printing a carriage return doesn't work, it just adds an additional line between prompts. At this point I call cakecmd twice, and so to complete my script I have to hit the Enter key twice within my Windows CMD console.
I got a promising response from Perl Beginners Google Group that suggest I use the CPAN Perl Module called Expect, however I am unclear how to use it. How can I tell Perl to use Expect, to look for a no time limit pause and then execute a carriage return?
Thanks
Thanks for the first answer. It doesn't work using either the system or the exec function. The system function gives me errors, the exec works but still has the same pauses requiring carriage returns. The parameter < ^M, doesn't seem to make a difference.