If you try to Start an .exe-Application on an Unix-Machine, you need Wine (http://www.winehq.org/). Than should the System-Call work
"cannot execute binary file "in RedHat using perl
Pregunta
I am new to Linux environment. I run a sample system command. I am getting the error as "cannot execute binary file". I run the same program in windows but i used batch file to execute exe file. I need to do the same program in linux environment.
sample code:
use strict;
use warnings;
system("/apps01/try.exe");
In this, I need to run the exe file and it should wait till the execution completes.Also i tried,
bash-3.2$sudo perl sample.pl
/apps01/try.exe: /apps01/try.exe: cannot execute binary file.
Solución
Otros consejos
You're already running the script but try.exe is a Windows executable (plus not found on your linux machine).
Try to run something else.. something executable if you intend to use that function, e.g.
#!/usr/bin/perl
use strict;
use warnings;
my $status = system("vi");
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow