摘要: 示例程序:getopt.pl;#!/usr/bin/perl -w#use strict;use Getopt::Std;use vars qw($opt_a $opt_b $opt_c);getopts('a:b:c');print "opt_a =>;$opt_a\n" if $opt_a;print "opt_b =>;$opt_b\n" if $opt_b;print "opt_c =>;$opt_c\n" if $opt_c;注释:'a:b:c',a和b后有冒号,表示-a,- 阅读全文
posted @ 2011-07-26 15:07 zjking99 阅读(9513) 评论(0) 推荐(0) 编辑