Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 118667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:31:51+00:00 2026-05-11T03:31:51+00:00

I know how to use Perl’s Getopt::Long, but I’m not sure how I can

  • 0

I know how to use Perl’s Getopt::Long, but I’m not sure how I can configure it to accept any ‘–key=value’ pair that hasn’t been explicitly defined and stick it in a hash. In other words, I don’t know ahead of time what options the user may want, so there’s no way for me to define all of them, yet I want to be able to parse them all.

Suggestions? Thanks ahead of time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:31:52+00:00Added an answer on May 11, 2026 at 3:31 am

    The Getopt::Long documentation suggests a configuration option that might help:

    pass_through (default: disabled)              Options that are unknown, ambiguous or supplied              with an invalid option value are passed through              in @ARGV instead of being flagged as errors.              This makes it possible to write wrapper scripts              that process only part of the user supplied              command line arguments, and pass the remaining              options to some other program. 

    Once the regular options are parsed, you could use code such as that provided by runrig to parse the ad hoc options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not a beginner to regular expressions, but their use in perl seems
I know how to use JSON to create objects, but there doesn't seem to
I know you can use C++ keyword 'explicit' for constructors of classes to prevent
I know you can use the <jsp:useBean> tag to instantiate objects within JSPs without
I know how I use these terms, but I'm wondering if there are accepted
We all know how to use <ctrl>-R to reverse search through history, but did
Can some one help me understand the output of this Perl program: use Data::Dumper;
I only know of Thread::Pool which is apparently not supported in recent Perl versions,
As we all know that we can send any number of arguments to a
Need to use Perl in order to create permutations Need to know if glob

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.