Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید

32.27. Getopt::Long


If your program says:


use Getopt::Long;
GetOptions("verbose" => \$verbose,
"debug" => \$debug,
"output=s" => \$output);


it can be called from the command line like this:

% prog --verbose more args here
% prog --debug more args here
% prog -v -d more args here
% prog --output=somefile more args here
% prog -o somefile more args here


The Getopt::Long module provides a GetOptions function to
process command-line switches with long names. It includes support
for things like abbreviating switches, typed arguments like Boolean
or string or integer or float, array variables for repeating
options, user-defined validation routines, POSIX-conforming
versus FSF-style processing, case-insensitive options, and traditional
bundling of short options--just to name a few out of its vast
cornucopia of features. If this module is overkill, consider the
more traditional Getopt::Std module described next. If this
module is underkill, check out the CPAN module
Getopt::Declare, which provides a more declarative
syntax for option specification.






/ 875