Par-Packer exe file question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Using: ActiveState Perl 5.10 with Windows XP and Vista

Question:  Is it possible to merge a .exe program into a .exe version of a
Perl program and then have the running Perl program send information to that
merged program through a pipe or by some other means?

Goal:  The goal here is to include two Gnuplot plotting program .exe
programs into a .exe version of a Perl program and then have those merged
Gnuplot .exe program draw plots.

The Par-Packer module lets people create .exe versions of their Perl
language programs with a Windows Dos command like this:

pp  -o  program.exe

And, additional files can be merged into the Perl .exe program with the add
file option such as:

pp  -o  program.exe  -a  pgnuplot.exe  -a wgnuplot.exe

pgnuplot.exe and wgnuplot.exe are Gnuplot programs that can be used with
Perl and Windows to plot data.

That command does appear to work.  It looks like it is merging the
pgnuplot.exe and wgnuplot.exe into the Perl program.exe program when it is

At the present time I am using a "pipe" to start pgnuplot.exe running and
then send it plotting commands.  If my understanding is correct, in order to
do that the Perl program normally has to tell Windows to link the running
Perl program with the Gnuplot pgnuplot.exe program that is stored on the
disk.  And sending the Gnuplot program through that pipe can in my opinion
be slow and prone to errors.

If the Gnuplot programs could be merged into the Perl .exe program and then
accessed in that manner instead of having Windows call a separate program
then perhaps the Perl - Gnuplot link might work better.

Is that possible?

What type of command would need to be used in the Perl .exe program to send
commands to the Gnuplot programs?

Would it be some type of pipe, or something else?

Re: Par-Packer exe file question

Quoted text here. Click to load it

I don't know. If Par-Packer doesn't fit your needs, then it sounds like
you need a Windows software installer. Google for same.
Quoted text here. Click to load it

You would use open to start gnuplot and link a file handler to
gnuplot's input:

  open( my $gnuplot, '|-', '/path/to/gnuplot' ) ...

(with suitable error checking).

Then to send commands to gnuplot:

  print $gnuplot "plot ...";

Jim Gibson

Re: Par-Packer exe file question

Thanks for your comments.

       This subject matter pertains to an important disaster mitigation
computer program that is being given for free use to governments and science
researchers around the world.  The first downloadable freeware version
became available in early 2009.  And a major update is about ready for
release.  The program uses an internal "pipe" between the Perl program and
Gnuplot software in order to draw data plots.  However, as I said in the
first posting, I myself have found that pipe process to be difficult to use,
slow, and prone to errors for this particular application.

       The subject matter of this Perl link with Gnuplot is fairly complex.
I have been discussing it in Perl and Gnuplot Newsgroups and with other
groups by E-mail.  And at the moment it does not look like it can be
resolved.  So I will probably have to go with one of three options.

1.  The present Perl - Gnuplot pipe and file data transfer connection can
continue to be used.  However, if this option is used the program will never
be something that governments could rely on for their important disaster
mitigation work.

2.  Some other Perl - plot drawing routine can be used.  There are a number
of plotting modules available for Perl.  But none appear to be as powerful
and versatile as the Gnuplot plotting program from what I can see.

3.  The program can be translated to some other language such as Python that
does reportedly have sophisticated plotting routines that have been
developed for it.  However, some of the Perl language features would then be

       For the moment this programming effort will continue using Option 1.
It works.  But as I said, government agencies and science researchers
actually need something more reliable and easier to use.

Site Timeline