Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 275669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:48:07+00:00 2026-05-12T00:48:07+00:00

I have a Perl/POE/Tk script running on Win32 ActivePerl that calls executables using system

  • 0

I have a Perl/POE/Tk script running on Win32 ActivePerl that calls executables using system. I created an exe of the script using pp. I can unpack the exe and see the executables off the root of the “zip” file directory, but when I run the exe and try to use the functionality of the system calls I get a “file not found” type of error;

'..\cpau' is not recognized as an internal or external command, 
operable program or batch file.

cpau.exe is one of the included files.

pp is called thus:

pp -i alias3.ico -g -a add_event.job -a add_rec.job -a CPAU.exe -a del_event.job -a del_rec.job -a dnscmd.exe -a eventcreate.exe -o alias_v_3-0.exe alias_poe_V-3_0_par.pl

I am guessing that I need to adjust the path of the system calls. I currently am trying to use the default path;

system("cpau -dec -file add_rec.job -nowarn -wait");

I tried this:

system("..\cpau -dec -file ..\add_rec.job -nowarn -wait");

reasoning that pp put the script in the \scripts\ directory, but no joy. Any suggestions?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:48:08+00:00Added an answer on May 12, 2026 at 12:48 am

    Update: My suggestions below do not work. However, I am going to leave them up in case someone else has a similar question. This answer shows a lot of things that may sound reasonable but do not work.

    See the discussion following the OP’s repost for code using $ENV{PAR_TEMP} that solves the OP’s problem

    FOR REFERENCE

    pp docs say:

    -a, –addfile=FILE|DIR
    …

    By default, files are placed under / inside the package with their original names.

    By using system, you are asking cmd.exe to find the file and I now realize that probably is a losing battle unless you have a separate executable called cpau.exe. I do not have time to try this right now, but a you might have to do the fork and exec yourself instead of relying on system. As in:

    exec 'CPAU.exe', @args
    

    Previous answer:

    The string you pass to system does not contain what you think it does:

    use strict;
    use warnings;
    
    my $x= "..\cpau -dec -file ..\add_rec.job -nowarn -wait";
    
    print $x, "\n";
    __END__
    
    C:\Temp> fgh
    ..►au -dec -file ..dd_rec.job -nowarn -wait
    

    Use (edited following OP’s comment below):

    system "..\\cpau -dec -file ../add_rec.job -nowarn -wait";
    

    I would also recommend using the list form of system:

    system '..\\cpau', qw(-dec -file ../add_rec.job -nowarn -wait);
    

    In addition, you might find FindBin handy if you want to specify the path to cpau relative to the current script’s directory.

    For example:

    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    use FindBin qw($Bin);
    use File::Spec::Functions qw( catfile );
    
    my $program = catfile $Bin, '..', 'cpau';
    
    system $program, qw(-dec -file ../add_rec.job -nowarn -wait);
    
    __END__
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 361k
  • Answers 361k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer your multicolumn amount is one too high change to \multicolumn{4}{c}{Hydrotalcite}… May 14, 2026 at 2:57 pm
  • Editorial Team
    Editorial Team added an answer A function f(x) is Θ(g(x)), iff: f(x) is O(g(x)), and… May 14, 2026 at 2:57 pm
  • Editorial Team
    Editorial Team added an answer I've found C# to be far more productive. The real… May 14, 2026 at 2:57 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.