Perlcc creates standalone executables from Perl programs, using the code generators provided by the B module. At present, you may either create executable Perl bytecode, using the '-B' option, or generate and compile C files using the standard and 'optimised' C backends. The code generated in this way is not guaranteed to work. In many cases Perl is used as a wrapper around other programs. This means that we run those other programs from our Perl program. For example we use Perl to collect the parameters needed by that program to make it easier for us to create the correct command line to run the other program.
Active7 years, 10 months ago
How to run an executable file using perl?
For instance, i want to run a plain notepad.exe. How could I achieve this?
This is what I've got:
But it returns:
Can't spawn 'cmd.exe': No such file or directory blah blah blah.
What am I missing?
Sinan Ünür
109k1515 gold badges178178 silver badges315315 bronze badges
quinekxiquinekxi
39933 gold badges1010 silver badges2626 bronze badges
3 Answers
ajeaje
Your code seems a bit confused. What you probably want is something like
system returns a single value, not an array. See perldoc -f system for a detailed description.
This thread on perlmonks discusses the error you're getting with a few different solutions being presented.
Convert Perl To Executable
This answer is an extension of my original comment. Sorry if it's superfluous.
gamengamen
Perl Executable Location
This is a Perl internal error probably caused by a broken environment. Perl can't find the Windows shell
cmd.exe that is used under the hood to run the program passed to system .
Use some utility as Process Monitor to see what's going on at the OS level.
salva
Perl Script To ExecutablesalvaPerl To Binary Executable
8,44033 gold badges2222 silver badges5050 bronze badges
Perl Executable CmakeNot the answer you're looking for? Browse other questions tagged perlexecutable or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |