如何将此Shell脚本转换为平台无关的Perl脚本? [英]How to convert this shell script to a platform independent Perl script?