Posted on 2007-07-22
Last Modified: 2010-04-16
Hi guys hope you can help.

I have a menu ( that you guys helped with.

What I want to do is when I select an option, to run that selection in a new command window, separate from the, so that I can make further selections, while the first one that I selected (now running in a new window) continues to run. If I need to abort the external script that is now running, to not kill the script.

Any help greatly appreciated.

Here is the code so far..

print <<EOF;
Press 1 for this subroutine
Press 2 for this subroutine
Press 3 for this subroutine
Press 4 for this subroutine
Press 5 for this subroutine
Press 6 for this subroutine


print "Enter menu choice: ";
my $choice = <STDIN>;
chomp $choice;

if ($choice == 1) {
elsif ($choice == 2) {
else {
   die "$choice is an invalid menu option\n";

sub sub1 {
  print "sub1\n";

sub sub2 {
  print ``;

Thanks guys.
Question by:Simon336697
    LVL 84

    Assisted Solution

    sub sub2 {
      system" &";

    LVL 51

    Expert Comment

    > .. to run that selection in a new command window
    what do you mean by "command window", xterm?
    LVL 1

    Author Comment

    Sorry ahoff,
    Im using ActiveState Perl on windows xp.
    LVL 51

    Accepted Solution

    sub sub2 {
      system("cmd.exe /K --full-path--to--/");
    LVL 1

    Author Comment

    Thanks ozo/ahoff!


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
    There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
    Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now