以下在Windows环境下
1、安装strawberry perl
打开网站Strawberry Perl for Windows,安装。
2、安装TextPad(用来写Perl程序)
打开网站TextPad - the text editor for Windows,安装。
3、配置TextPad
打开TextPad,点击configure->new document class
在出现的弹窗中间的写
document class name:Perl
点击下一页,写
class members:*.pl
点击下一页,
选中enable syntax highlight
syntax definition file选择perl5.syn
完成
4、写Perl程序
打开TextPad,写入Perl程序
print"hello world!\n";
保存为hello.pl,文件保存为.pl形式的文件
5、执行Perl程序
打开命令提示符
切换到程序所在盘(如果切换到D盘,输入d:即可进入)
进入程序所在的文件夹
输入dir,可以看到文件夹中的程序文件hello.pl
执行程序:perl hello.pl