如何创建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


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

查看所有标签

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

Pragmatic Thinking and Learning

Pragmatic Thinking and Learning

Andy Hunt / The Pragmatic Bookshelf / 2008 / USD 34.95

In this title: together we'll journey together through bits of cognitive and neuroscience, learning and behavioral theory; you'll discover some surprising aspects of how our brains work; and, see how ......一起来看看 《Pragmatic Thinking and Learning》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具