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

  • SEARCH
  • Home
  • 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 7847953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:03:11+00:00 2026-06-02T18:03:11+00:00

I am using the Perl CGI module. If I have HTML like this <select

  • 0

I am using the Perl CGI module. If I have HTML like this

<select multiple name="FILTER_SITE">
  <option>1</option>
  <option>2</option>
</select>

and submit my form I can get something like this in the URL:
[..] FILTER_SITE=1&FILTER_SITE=2

Perl’s my $FILTER_SITE = $cgi->param('FILTER_SITE'); wil capture only the first instance.

How can I make use of both (in this case)? Hack it and parse the referrer myself and add them to an array is my first idea but it’d be a bit messy, then again I’m hardly versed in CGI.pm or Perl.

With Data::Dumper, interestingly

print "<pre>".Dumper($cgi->param('FILTER_SITE')) . "</pre>";

$VAR1 = '1';
$VAR2 = '2';
  • 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. Editorial Team
    Editorial Team
    2026-06-02T18:03:12+00:00Added an answer on June 2, 2026 at 6:03 pm

    NOTE: Current documentation (as of 2020 May 29) says this method could cause a security vulnerability. Please check my answer below.

    The param method supplies a single value in scalar context and (potentially) multiple values in list context. Read about it here.

    So if you change your code to, for example

    my @FILTER_SITE   = $cgi->param('FILTER_SITE');
    

    then the array will contain all selected values of the option.

    If it suits your code better, you can also write

    for my $FILTER_SITE ($cgi->param('FILTER_SITE')) {
      :
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried without success setting cookies using Perl CGI. My code looks like
I currently have a Perl CGI script that parses incoming XML requests using XML::Simple
I am using a Perl module called from a CGI scipt in IIS 6
I'm working on a homework assignment in Perl CGI using the CGI.pm module. In
I have written a Perl CGI script which fetches an html page from a
I have a perl script using CGI. The browser calls it with some parameters.
I am building a perl cgi::application using html::template. I am using 7-8 different templates
I have application that works using Perl's CGI::Fast . Basically mainloop of the code
I am using CGI.pm version 3.10 for file upload using Perl. I have a
Background I am writing and using a very simple CGI-based (Perl) content management tool

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.