- parameter name with dollar

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to grab some params with Normally not hard but the
names are like $selected.fieldname eg

These params are passed in by an application I canot change <sigh>.
And there is some existing code that does not use and does
rather too much print raw html.

here is the code that works:
$buffer = $ENV;
@pairs = split(/&/, $buffer);

foreach $pair (@pairs)
    ($name, $value) = split(/=/, $pair);
    # Un-Webify plus signs and %-encoding
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $name =~ tr/+/ /;
    $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $FORM = $value;
$Server= $FORM)

and here is the code that does not:
use strict;
use warnings;
use CGI::Carp qw(fatalsToBrowser);
use CGI ':standard';
use CGI::Pretty;
my $ServerSerial = param( '$selected.Server' );

and here is the URL that calls the cgi

Any suggestions?


Re: - parameter name with dollar

When you see the difference between "$selected.Server" and
'$selected.Server' and you will have solved your problem.

    Lawrence Statton - lawrenabae@abaluon.abaom s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
place them into the correct order.

Site Timeline