Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl exe compiler closes my cmd window 1

Status
Not open for further replies.

samdaman

Technical User
Oct 23, 2002
23
NZ
Hi there

I have hopefully a small problem. I have successfully compiled my perl script to an exe file. The only problem is, my output to screen disappears after 2 seconds, and I need it to stay open until the user &quot;pushes any key&quot;. I have tried adding lines in my script to keep the window open, like <STDIN> and sleep 10 etc, which works via the perl script, but not via the exe file.

Any ideas?

Kind regards

Sam
 
Hi Sam,

Which compiler are you using?

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
The compiler I am using is from Indigostar.
I have also made a batchfile to run the exe from a cmd prompt with the pause line which works, but if possible can it be done without the batch file?

Thanks and kind regards

Sam
 
Perl2Exe then, I've got that - I'll try it out.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Ok -- this was compiled using Perl2Exe and behaves as you would expect when run from both the .pl and the .exe:

use strict;
use warnings;

print &quot;About to wait\n&quot;;
my $a = <>;
print &quot;Finished waiting\n&quot;;


Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
doh!! thanks mike ill remember this for next time.

Kind regards

Sam
 
<smile> first question I've answered in ages, have been a bit busy - glad you're sorted Sam

How are you getting along with Perl2Exe in general?

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top