1. Shell中用=赋值时,=两边不能有空格;
2. Shell中else if书写为elif,Perl中书写为elsif;
3. Shell中判断字符串为空用-z $str或者-n $str;
4. Shell中字符串替换为:str=${str//regExpr/replace},而Perl中为$str =~ s/regExpr/replace/g;
5. Shell中条件表达式的And为-a,Or为-o,而Perl中为&&和||,与C比较类似;
6. Perl的关联数组非常好用,注意引用的使用;
7. Shell字符串比较用==,!=,<,>,数字比较用-eq,-ne,-gt,-lt,而Perl中则相反;
8. Shell的命令行参数为$1,$2,...,而Perl中为ARGV[0],ARGV[2],...;
9. Shell打开文件读写为<Filename,>filename,而Perl中为open(HANDLE, filename),open(HANDLE, >filename);