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 }