#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0

    Execution of different Perl exe in single exe


    Hi,

    I have done 3 projects. Each one is different from other.
    Now my customer wants to make it as generic.
    I have 3 .exe files for 3 projects.
    My idea is Using GUI we can select the corresponding project and execute that .exe file alone. Is it possible to do it?

    Thanks for u r reply in advance.

    Thanks & Best Regards,
    Venkatesh
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    Of course it is possible. But do you want to do that in Perl?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0
    Hi Laurent_R,

    I want to do this in Perl only.
    What my idea is create some GUI, in that it should ask which file should be executed? Like that.... Is it possible to implement?
    Can u just explain me briefly if u know how to do it?
    I am beginner of Perl.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    The way to execute an executable program from a Perl script will depend on whether you want the script to get data returned by this program or not, and also whether you want the script to wait for the exe program to complete or not.

    The basic three ways to do it are:

    Code:
    my $return_status = system "program.exe"; # waits for the return status of the exe programe
    exec "program.exe"; # ends the execution of the current Perl script
    my @prog_output = `program.exe`;
    As for the GUI, I haven't used the Perl TK GUI for about 10 years, I would not be able to help at this point (there are also other GUI toolkits, but I do not know them), but I know it is not very difficult for a task as simple as what you want to do.

IMN logo majestic logo threadwatch logo seochat tools logo