Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:


I need to pass some params from a web form to a CGI script. Some params are passed by the user, others are "hard coded". My CGI strangely reads only the ones passed by the user, not the hard coded ones. Any idea?

<form action="/cgi-bin/" method="get" accept +-charset="UTF-8"> <div class="form-group"> <label for="id">&nbsp;Your token</label> <input id="id" name="token" type="text" class="form-control" reado +nly > </div> <div class="form-group"> <button name="submit" type="submit" class="btn btn-primary">Delete< +/button> </div> </form>


#!/usr/bin/perl -T use warnings; use strict; use CGI qw(-utf8); use CGI::Carp qw(fatalsToBrowser); my $q = CGI->new(); my $token = $q->param('token'); my $key = $q->param('key'); my $usr = $q->param('usr'); print $q->header("text/html;charset=UTF-8"); print "Token: $token - Key: $key - Usr: $usr";