Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up sublime text 2 with activeperl?

New to using sublime text 2 and I'm wondering how to get it to point to the activeperl.exe (on win7).

I'm testing out the compiler to make sure it works with something simple like:

$x = 1;
$print "$x";

But it gives me guff about how $x isn't a recognized syntax. I did point ST2 to my python executable, but I forgot which file in the labyrinth I was supposed to edit the path to.

like image 835
AI52487963 Avatar asked Oct 08 '12 21:10

AI52487963


People also ask

What are the settings in Sublime Text?

The settings in Sublime Text are organized into three categories. The default settings file organizes the settings into sections for easier distinction. Editor Settings: These settings affect the behavior and functionality presented when editing text in a file. Examples include the font_face, tab_sizeand spell_check.

How to compile C++ program in Sublime Text?

Sublime Text provides build systems to allow users to run external programs. Create a new build system for Sublime Text for setting up C++ compilation. Open Sublime Text editor and then go to Tools > Build System > New Build System. Paste the following code in the file and save it. Name the file as “CP.sublime-build“.

How do I create a build system in Sublime Text?

Creating a Build System 1 Open Sublime Text editor and then go to Tools > Build System > New Build System. 2 Paste the following code in the file and save it. 3 Name the file as “ CP.sublime-build “. More ...

How do I run G++ in Sublime Text?

Copy the path of the bin folder. By default, the path is: C:\MinGW\bin Paste this new path in the list and click OK. Now Sublime Text is able to access g++ from its terminal as the path variable has been updated. Sublime Text provides build systems to allow users to run external programs.


1 Answers

This worked for me, taken from: http://www.perlmonks.org/?node_id=935014

  1. Click "Preferences -> Browse Packages"
  2. Navigate to the "Perl" subfolder
  3. Create a file called "Perl.sublime-build" with the following content:
    {
      "cmd": ["perl", "-w", "$file"],
      "file_regex": ".* at (.*) line ([0-9]*)",
      "selector": "source.perl"
    }
  1. Manually set the build system by clicking "Tools -> Build System -> Perl"
  2. You can now run your Perl script by mashing Ctrl+B

I am running this version of ActiveState Perl:

C:\>perl --version
Binary build 1402 [295342] provided by ActiveState http://www.ActiveState.com
Built Oct  7 2011 15:49:44
like image 98
nik Avatar answered Sep 23 '22 23:09

nik