Note, I'm a beginner at Perl programming. Much is copying other's
scripts and hacking.
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 in my script,
and so to complete it I have to manually 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? Also there is a
Pel instructor who was helping on Mahalo Answers, but so far his
suggestions don't work either.
Can the next version of cakcmd contain an option to exit and return to
the command prompt after the "report"? Also can the next version have
an option to go to stdout instead of to file, that would be helpful
for programming. Also an option to suppress errors would be helpful
too.
The reason I am choosing cakecmd over other command line zip programs
is I am developing a text extractor for corrupt docx Word 2007 files
which are really zipped up collections of xml files. The text is all
within the file word/document.xml within the larger docx/zip file.
Cakcmd will unzip what it can from corrupt word/document.xml files,
albeit with an error, whereas other cmd line zip program will error
out or return 0 KB files in at least some cases that I have seen.