in reply to Re: Recieving input during runtime..
in thread Recieving input during runtime..

I tried using <STDIN>, however, when i run exe, it doesnt ask me for any input.

If i run script normally through command prompt it works fine. However according to requirements i need to convert it into an executable.

Replies are listed 'Best First'.
Re^3: Recieving input during runtime..
by marto (Cardinal) on Nov 30, 2010 at 11:06 UTC

    Well I tried a very basic example:

    #!/usr/bin/perl use strict; use warnings; print "Please enter an output file name: "; my $outputfile = <STDIN>; chomp($outputfile); print "User input: $outputfile\n";

    and converted it to an executable using pp:

    pp -o inputtest inputtest.pl

    Which runs as follows:

    Please enter an output file name: testfile.txt User input: testfile.txt

    Perhaps if you showed an example of your code and how you converted it to an executable someone would be able to help.

Re^3: Recieving input during runtime..
by mjscott2702 (Pilgrim) on Nov 30, 2010 at 13:00 UTC
    How are you creating the executable? If you are using something like perl2exe with the -gui option, you won't see anything written to STDERR, for example.