Thanks for your replies. I didn't post code initially because I didn't think people would appreciate me dumping the problem directly onto them. But here's the relevant code:
Immediately after the relevant beginning lines, I create three hashes I'll use. %INPUT is the one in question. I haven't got it far enough to know if the other two work. We all know %ENV, and %CFG has values from a config file I load.
my (%INPUT,%CFG,%ENV);
To clean up my "main" program, I dump off the initialization of %INPUT to a subroutine, which I call immediately after my variable declarations (save a few comments in between):
my ($buffer,$name,$value,@pairs,$pair);
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
$name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$INPUT{$name} = $value;
print "\$INPUT{$name} = $value<br>";
}
That last line was put in to help me see if any of the values are printed. I expected it to at least print "$INPUT{} = " (null for the actual values), but in fact, it didn't print anything.
Even if I put this code immediately after the above "my (...)" code, it still doesn't give me any output.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.