## Launching Perl Programs

You may launch your Perl programs from the workbench. Programs may be launched in either run or debug mode.

- In run mode, the program executes, but may not be suspended or examined.

- In debug mode, execution may be suspended and resumed, variables may be inspected, and expressions may be evaluated.

The environment a Perl program is to be executed in is defined via "Launch Configurations". A launch configuration defines

- if the program is to be executed in a CGI or normal Perl environment

- the host the program is to be executed on

- the program to execute

- execution parameters to pass

- environment variables

- configuration data for the web server used to provide the CGI framework

### Launching Perl Programs in Run Mode

1. Select Run → Run... from the Eclipse menu.

2. Within the appearing dialog, select the configuration type:

   - Perl Local: Run a Perl script on the local machine

   - Perl CGI: Run Perl programs in a CGI environment on the local machine

   - Perl Remote: Run a Perl script on a remote machine

   and press the New button to create a new launch configuration.

3. Adjust launch configuration attributes. For details see the section called “Creating Launch Configurations”.

4. Press the Run button.

This executes the program. The program's console output will be shown in the console window. For "Perl Local" and "Perl Remote" configurations, the console window also accepts keyboard input to be passed to the program.

If you switch to the debug view, you have additional control over the execution of the program. For details see the section called “Debug View”.

### Re-launching a Perl Program

The workbench keeps a history of each launched and debugged program. To relaunch a program, do one of the following:

- Select a previous launch from Run or Debug button pull-down menus.

- From the menu bar, select Run → Run History or Run → Debug History and select a previous launch from these sub-menus.

- In the Debug view, select a process that you want to relaunch, and select Relaunch from the process's pop-up menu.

To relaunch the most recent launch, do one of the following:

- Click the Run or Debug buttons (without using the button pull-down menu).

- Select Run → Run Last Launched (Ctrl+F11), or Run → Debug Last Launched (F11) from the workbench menu bar.