Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Some code by aeshirey
in thread use strict seems to hose my code by aeshirey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-18 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found