Home  >  Article  >  Development Tools  >  How to test Perl code directly with Sublime Text2

How to test Perl code directly with Sublime Text2

藏色散人
藏色散人forward
2021-06-09 15:23:112808browse

The following tutorial column from sublime will introduce to you how to directly test Perl code with Sublime Text2. I hope it will be helpful to friends in need!

How to test Perl code directly with Sublime Text2

Sublime Text 2: Test the Perl code directly

Sublime Text 2 does not have a built-in Perl build system, so you can Create it yourself via the menuTools > Build System > New Build System.... The created text is essentially a json file, which is saved by ST2 in the /<APP_PATH>/Packages/User directory with the .sublime-build suffix. The text content is as follows:

/*在ST2中执行*/
{
    "cmd": "perl $file",
    "selector": "source.perl"
}

or

/*
在cmd窗口中执行;
'/c'表示执行完毕后关闭窗口,与'/k'对应;
两个'PAUSE'保证无论文件是否成功运行都能得到反馈信息
*/
{
    "cmd": ["start", "cmd", "/c", "perl $file && PAUSE || PAUSE"],
    "selector": "source.perl",
    "shell": true
}

The above is the detailed content of How to test Perl code directly with Sublime Text2. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete