How to Pack a Perl Script into a Single Executable
BoxedApp Packer bundles a Perl script into one self-contained EXE. Runtime files, modules, and your assets are embedded and served from a virtual file system in memory - no installation and no temp files on disk.
The Task
On Windows, distributing a Perl script usually means asking users to install a Perl runtime. With BoxedApp Packer you can avoid that by shipping a single EXE that contains the runtime, modules, and your script.
The sample prints lines from an external text file and will embed that file too.
Prepare the Package
- Use 32-bit Perl runtime to build an EXE that runs on both 32-bit and 64-bit Windows.
- Using 64-bit runtime produces a 64-bit EXE that will not run on 32-bit Windows.
Download a Perl runtime (for example ActivePerl or Strawberry Perl) and BoxedApp Packer. Launch Packer and set perl.exe as the input executable, then choose any output EXE name.
To run the script normally you would pass the script path to perl.exe:
perl.exe hello.plIn Packer, enable Override command line and set:
<BoxedAppVar:OldCmdLine> "<ExeDir>\hello.pl"This makes the packed EXE run as if hello.pl was passed to perl.exe. Now add required runtime files and modules.
- In Application Directory, add
perl.exe(from the Perl installation bin directory). - Add
perl520.dllor the corresponding Perl DLL required by your runtime (from the same bin directory). - Add core modules the script uses, for example
strict.pmandwarnings.pm(from Perl lib directory). - Add your script
hello.pland any data files, for examplehello.txt.
Build and run. It prints the expected text.
Screenshots






Benefits
- Single EXE distribution on Windows - no Perl installation required.
- Files are virtualized and not written to disk - protect sources and assets.
- Works from USB or network share, no admin rights required.
- Supports icons, splash screens, and custom launch parameters.