Hi Brandon,

Actually I'm able to run the script from the DOS prompt with "perl script.pl".
It might be a permissions problem in Windows 7...

But, can you please tell me how to compile the .pl script to .exe in
windows, with Strawberry? Which command should I use? I'm not familiar with
this release...

Kind regards,

Miguel Fernandes



On Fri, Nov 13, 2015 at 6:21 PM, Brandon McCaig <bamcc...@gmail.com> wrote:

> Rui:
>
> On Thu, Nov 12, 2015 at 8:53 AM, Rui Fernandes <rui.kep...@gmail.com>
> wrote:
> > Hi,
>
> Hello:
>
> > I'm having a problem compiling a perl script to run in my windows 7 32
> bits
> > environment. It compiles with Perl Dev Kit from active state, but when I
> run
> > it (in the command line of dos) it just freezes - no anwer. The
> compilation
> > gives no error. Does anyone knows why this might be happening?
>
> Ordinarily Perl programs are compiled just before they are run. How
> are you attempting to run it? I am not familiar with ActiveState's
> "Perl Dev Kit" (and I imagine many of us wouldn't be). I imagine
> ActiveState has a support channel though so you could try directing
> your problem to them.
>
> Normally to run a Perl program you would just pass the path of the
> perl script to the perl executable:
>
>     C:\Users\bambams\src> perl myscript.pl
>     Hello World!
>
>     C:\Users\bambams\src>
>
> In *nix environments you can use a shebang line (the #! line at the
> beginning of a script) combined with an executable bit to execute the
> script directly and have the system execute the interpreter for you:
>
>     bambams@home ~/src$ ./myscript.pl
>     Hello World!
>
>     bambams@home ~/src$
>
> In Windows, it might work similarly if there is a file association
> setup for the .pl file extension. To be safe and consistent it is
> easiest to just invoke the perl executable manually as in the first
> example.
>
> Does any of this help you to understand the problem? Is ActiveState's
> "dev kit" actually attempting to assemble a self-contained .exe with
> your Perl program and the perl interpreter (ignore this suggestion
> entirely if it's gibberish to you)?
>
> I support the suggestion to give Strawberry Perl a try. It's assembled
> with free (as in speech) software and contains everything you need to
> build and install most Windows-compatible CPAN modules.
>
> Regards,
>
>
> --
> Brandon McCaig <bamcc...@gmail.com> <bamb...@castopulence.org>
> Castopulence Software <https://www.castopulence.org/>
> Blog <http://www.bambams.ca/>
> perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
> q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
> tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
>



-- 


*Rui Miguel Fernandes*
*Porto - Portugal*



*Website: Cosmos - Portal Interactivo de Astronomia / Interactive Gate of
Astronomyhttp://www.cosmos.pt <http://www.cosmos.pt>*

Reply via email to