Perl Code Inserts

EditRocket provides Perl code inserts, or snippets, via the Inserts - Perl menu option. Code inserts are also included as a tab on the Perl sidekick. The keyboard shortcut of ctrl or cmd + shift + i launched the code insert popup window.

The following types of code inserts are available for Perl:

Statements - This includes if, if else, and if elsif else statements.

Loops - This includes for, foreach, unless, and while loops.

General Inserts - function, try block

Selecting an insert with insert the text associated to the insert into the current position of the active editor. For example, selecting the if elsif else statement insert will insert the following:

if () {

   # code

} elsif () {

   # code

} else {

   # code


The "variable" piece of the inserted text will be highlighted allowing the user to type in a variable name without having to click or highlight text.

Perl inserts can be modified, or custom Perl inserts can be created using the Insert - Edit Insert and Insert - Add Insert options.