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

How to test Perl code directly with Sublime Text2

藏色散人
Release: 2021-06-09 15:23:11
forward
2869 people have browsed it

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"
}
Copy after login

or

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

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template