L
L
Lorents2013-11-04 22:53:00
Perl
Lorents, 2013-11-04 22:53:00

Run Perl Script on Windows

Good evening!
Can you please tell me how to run this script on Windows?

I have ActivePerl 5.16.3 Build 1603 installed with File::Slurp and File::Temp installed. As I understand it, the problem is in JPEGtran , but I don't understand where to put it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
nochkin, 2013-11-04
@nochkin

jpegtran.exe is just an executable file that can be put in any directory where PATH looks (this can be, for example, the current directory or even c:\windows)

S
SleepingLion, 2013-11-05
@SleepingLion

Try the following version: link .
Replaced pipe call with IPC::Run handlers.
It has not been tested on Windows - it may not work.
And, yes, don't forget jpegtran.exe in PATH. )

@
@ntkt, 2013-11-05
_

The real problem is this:


List form of pipe open not implemented at b:\jpegrescan.pl line 33.

In ActivePerl on Windows, you can't do this:

open TRAN, "-|", "jpegtran", "-v", @strip, "-optimize", $fin or die;

S
SleepingLion, 2013-11-06
@SleepingLion

Replaced *nix-specific calls with (in theory) more suitable for Windows.
In the second version, I fixed sleepy jambs and tried to change the format for submitting content to the encoder.
True, for lack of desire to collect jpegtran for myself (I did not find it in the repositories right away), not a single script was checked. Although there was hope that it would work, yes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question