Perl Packer not operating as expected - perl

I've recently installed the Perl Packer module to compile my perl scripts into exe packages. I'm running strawberry perl setup on a windows 32-bit machine. When I attempt to run the pp -o command, I get an error stating that Perl is not part of my path. It is, for some reason, looking for perl in F:/Programs/Strawberry Perl/site/bin/perl.exe, when the true path is F:/Programs/Strawberry Perl/bin/perl.exe. Perl itself runs fine from commandline. How can I get Perl Packer to find my perl.exe?

What about calling this way?
perl pp {your options goes here}
regards

Related

Upgrade Perl v5.8 to Perl v5.10 on on Ubuntu 8

I have installed the Perl v5.10 in /home/admin/localperl location as per the below install commands
./Configure -des -Dprefix=$HOME/localperl
make test
make install
But when I ran the $ perl -v command am still seeing perl, v5.8.8 instead of Perl v5.10
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
I am a windows user and in the windows world I usually change the class path to make it work, but am not sure how this can be done in Ubuntu 8 world, can someone please help?
That's because /bin appears before /home/admin/localperl/bin in your path.
Add the following to your login script:
export PATH="/home/admin/localperl/bin:$PATH"
(Bourne shell syntax provided; adjust as needed.)
Remember, the scripts that should use this Perl should have the following shebang line:
#!/home/admin/localperl/bin/perl
The standard Perl installers will automatically convert #!/bin/perl into the above in scripts they install.

How to run perl or shell scripts in windows in secured environment without strawberry perl or Cygwin

I need to write perl or shell scripts in windows environment for automation. Please suggest some freeware.
For perl I tried padre perl but post installation it requires connection with CPAN which my proxy doesn't allows.Hence its unable to identify modules once I run perl scripts.
Also for running Shell scripts I tried cygwin but its unable to identify loop statements while running shell scripts.
How should I go ahead?
Thanks in advance!
Why you don't use Activestate? I think is the best perl packaged system for Windows.
Here's the link for the free community edition:
http://www.activestate.com/activeperl/downloads
As for editors, you can also use Komod Edit: http://komodoide.com/komodo-edit/

Not able to run Perl script after installing Active Perl

After installing ActivePerl 5.8.7, I am trying to run a perl script but it says perl is not recognized as internal or external command. What should I do in order to run my script? Are there any things we should do after installing Active Perl. I am using a Windows 7 system

How can I automate a Perl installation / script

I'm brand new to Perl. We have a useful script in the office that people would like to use. Unfortunately it has been deemed hard to setup because one has to download and install Strawberry Perl, manually install a few CPAN modules from the command line, and then run the script with the right arguments. It's really not that bad and there is a readme to follow but is there an easier way to handle the installation? I'm sure I could make a batch file to install the CPAN modules, but what about setting up the environment variables (if needed)? I don't suppose there is a way to automate the Strawberry Perl installation or have it 'come with' the necessary modules?
How would you normally install software on client workstations? That's the method you should use now.
If you don't have anything like that, I would suggest using psexec http://technet.microsoft.com/en-gb/sysinternals/bb897553.aspx
You should be able to 'silent install' Strawberry Perl with the MSI installer.
http://msdn.microsoft.com/en-us/library/aa372024%28v=vs.85%29.aspx
Then use psexec again, to do the CPAN installs.
If you need to do environment variables, then you can either do that within your perl script, or you might have to mess with the Windows registry remotely.
Create a BAT or CMD script that runs the Perl installer, followed by the CPAN install commands. The trick is probably that when the BAT starts, the Perl install area (C:\Perl\bin or whatever) won't be on the search PATH. That will make it hard to run the CPAN commands. So, the BAT script should include a command to manually add the path to CPAN into the script's environment. You can even build up a list of modules, and run them in a loop. I use ActiveState, not Strawberry Perl, but my installer looks like:
#echo off
Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
REG.exe Query %RegQry% > "%TEMP%\checkOS.txt"
Find /i "x86" < "%TEMP%\CheckOS.txt"
If %ERRORLEVEL% == 0 (
echo This is 32-bit operating system...
\\Server\Shares\Installers\ActivePerl-5.16.3.1603-MSWin32-x86-296746.msi
) ELSE (
echo This is 64-bit operating system...
\\Server\Shares\Installers\ActivePerl-5.16.3.1603-MSWin32-x64-296746.msi
)
REM Even though the above stuff should have installed Perl locally and updated the PATH,
REM the new PATH won't be available in this BAT script since it was launched before the change.
REM Add both possible locations for local Perl to the PATH before running the PPM commands below.
PATH=C:\Perl64\bin;C:\Perl\bin;%PATH%
set MODULE_LIST=(Archive-Extract DBI DBD-ODBC Data-Validate Date-Manip Date-Simple File-Copy-Recursive List-MoreUtils Mail-Sender Mail-Sendmail Params-Validate SOAP-Lite Spreadsheet-WriteExcel Text-CSV Tie-IxHash)
for %%i in %MODULE_LIST% do cmd/c ppm install %%i
Your final line would be a cpan command install of ppm, but hopefully you get the idea!

How can I run a Perl script with ActivePerl?

I just recently installed ActivePerl 5.12.2.1202 on my Windows XP in C:/Perl. I am new to Perl scripting.
I just want to run a Perl program which contains one print statement, which I saved in Notepad with the name ex.pl.
How can I run this Perl program?
Can I use an editor for typing a Perl script other than Notepad?
How do I use ActivePerl?
Run Perl program from command prompt
start->run>cmd (command prompt will appear), write perl full_path_of_your_script,
like
C:\> perl hello.pl #This assumes that perl is in your PATH environment variable.
There are many Perl Editors, you can
used for Perl scripts like DzSoft,
Perl Expess, Komodo Edit etc and also see http://www.perlmonks.org/?node_id=169668 and Perlfaq3- Windows Perl Editors for more detail.
Have a look at http://docs.activestate.com/activeperl/5.12/, for ActivePerl 5.12 documentation.
Perl programs (or any other program run by an interpreter) is run by passing the script as a command-line argument to the interpreter. For example, in this case:
perl.exe ex.pl
Padre the Perl IDE and Kephra are good editors for Perl.
As an alternative to ActivePerl, there is Strawberry Perl.
Perl programs are run using the Perl interpreter, perl.exe.
This is normally done from the command line:
C:\>C:\Perl\bin\perl ex.pl
If perl.exe is in your PATH environment variable that can be shortened to:
C:\>perl ex.pl
If you opted to have *.pl files associated with Perl during installation, you can also double-click on them from Windows Explorer.
If you have *.pl files associated with Perl and add .PL to your PATHEXT environment variable you can run them like any other executable:
C:\>ex
Perl programs are just text files. They can be edited with any text editor (Padre, Kokomo, vim, emacs, Notepad++, etc.). Use whichever one you like best.
ActivePerl is just a distribution of Perl. "Using" it usually means running perl.exe to execute your program. ActivePerl also includes the PPM (Perl Package Manager) utility to make it easier to install modules from CPAN, particularly if you don't have a C compiler available. Most experienced Perl developers prefer to use the cpan shell.
Just to add to the other answers, I use EPIC, the Perl eclipse plugin. I'm using Perl on a Windows 7 64 bit machine.
I still run scripts off the command line in windows using ActivePerl, but for development I like being able to dynamically step through the script line by line.
just to not paraphrase other answers and to be more helpful (even if the post is somehow old ) i recommend using the switch "-e" to run Perl scripts if they are composed of few statements e.g
Perl -e "print('hello')"
and of course this requires that the Perl executable is in the Path variable,if not and assuming Perl is under the folder c:\Perl , you can add it by taping :
set %PATH%=%PATH%;c:\Perl\bin
when it comes to the choice of text editor ,I'm still using Notepad++ for almost everything ,it come with some useful features like keywords highlighting and some auto-completion capabilities.