CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Getopt::Long - simple numeric option


New User

Jul 6, 2011, 8:42 PM

Post #1 of 1 (1346 views)
Getopt::Long - simple numeric option Can't Post

It is common for many *nix utilities to have a pure
numeric option (with no identifier). For example:

grep -3 ... , which is short for grep -C 3


fmt -72 ... , which is short for fmt -w 72

I could not find a way to do that in perl, using
Getopt::Long::GetOptions(). Am I missing something?

I could roll my own by transforming @ARGV
before calling GetOptions(), but it seemed to
me that perl should have a facility to do pretty
much everything that standard *nix utilities do.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives