如何创建Perl脚本以获取一些“命名”命令行参数?

栏目: Perl · 发布时间: 7年前

内容简介:使用翻译自:https://stackoverflow.com/questions/2230483/how-can-i-create-a-perl-script-to-get-some-named-command-line-arguments

如何创建 Perl 脚本以获取一些“命名”命令行参数?

例如:

perl my_perl.pl -ARG_1 1234 -ARG_2 "Testing"

其中ARG_1和ARG_2是参数名称,1234和“测试”它们的值.

使用 Getopt::Long 可以获得类似的效果.主要区别在于它默认使用gnu-style –arguments.它非常灵活和强大.

翻译自:https://stackoverflow.com/questions/2230483/how-can-i-create-a-perl-script-to-get-some-named-command-line-arguments


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Data Structures and Algorithms

Data Structures and Algorithms

Alfred V. Aho、Jeffrey D. Ullman、John E. Hopcroft / Addison Wesley / 1983-1-11 / USD 74.20

The authors' treatment of data structures in Data Structures and Algorithms is unified by an informal notion of "abstract data types," allowing readers to compare different implementations of the same......一起来看看 《Data Structures and Algorithms》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具