in reply to Re^5: making perl executable
in thread making perl executable

i am on windows , so I did dir , it shows hello with no extension

Replies are listed 'Best First'.
Re^7: making perl executable
by marto (Cardinal) on Jul 05, 2013 at 15:03 UTC

    Did you try renaming it and adding the .exe extension?

      yes i did , a message is displayed "A problem caused the prog to stop working correctly . Windows will close the prog and notify you if a solution is available "

        Here's an example running on windows:

        #!/usr/bin/perl use strict; use warnings; use Text::CSV; print "Derp\n";

        Ensure the code runs as expected from the command line. Now package it and the modules used:

        D:\>pp -x -o derp.exe derp.pl Derp

        Note that -x runs the code, which is why Derp is displayed, this determines other runtime based dependencies. Now I see:

        D:\>dir derp.exe Volume in drive D is Data Volume Serial Number is F217-BC95 Directory of D:\ 05/07/2013 16:21 4,003,560 derp.exe 1 File(s) 4,003,560 bytes

        Running the code works as expected, not that it's doing much. As explained pp creates a self extracting executable so you can basically unzip it using 7zip (or similar) to see what's inside.

        Note well the other PAR/pp debugging advice given over the last few days.

        Update: slight reword of the -x usage explanation.

        Update 2: substitute your perl code for mine, convert as above and report back any problems.