enrgyxprt has asked for the wisdom of the Perl Monks concerning the following question:
So, after reading a bunch on perl2exe here at the monastery, I ask with much trepidation the following.
I have a basic less than 100 line script that has worked amazingly well. Id like to share it with my peers, but know they would disregard as soon as I said, "you need perl..."
Installed strawberry on a spare laptop, downloaded perl2exe, installed a few dependency's in CPAN, created my Icons, ran
and was greeted by the sight of my.exe I got good at pressing "prt screen" and finding I needed to add
#perl2exe_include PerlIO #perl2exe_include Encode
What I think I'm seeing is my.exe is choking on
open(my $remvrfh,'<:encoding(UTF-8)',$remvr) or die("Can't open input file \"$remvr\":$!\n");
so first, is #perl2exe_include Encode enough or is there anything else I need for the (UTF-8) ?
Second, my.pl was designed to be run from a batch file. In that batch file I have
@perl "%~dp0my.pl" %* Using the batch file, launches my.pl in a small cmd window for a brief second and life is grand.
Now, as my idea has evolved, I was thinking I could exclude the batch file completely, that the parameters or Args sent by windows to my batch (from double clicking a file.blt mapped to open with my.bat by default)would be sent to my.exe. But, thats only a hunch. I have in my .pl
$path=abs_path($0) $arg0="$ARGV[0]";
So, Question 2 is,
do I need to manage the double click - bat %~dp0 and %* to my.pl differently,
and if so please respond as little as you like but at least leaving breadcrumbs or letting me know every thing you do !
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl2exe encode issue
by Anonymous Monk on Jan 22, 2017 at 04:03 UTC |