in reply to Need help understanding some code ...

Those likes are a hand-rolled attempt at parsing/decoding CGI. You're supposed to use CGI, or CGI::Simple or CGI::Lite for that.

use CGI or die;

  • Comment on Re: Need help understanding some code ...

Replies are listed 'Best First'.
Re^2: Need help understanding some code ...
by ww (Archbishop) on May 15, 2010 at 23:16 UTC
    Anonymonk:
      ...or perhaps a wildly misguided attempt to untaint the input?

    I might buy that notion, too, except for one thing: In the code we can see, we assign input to $value: transmute it (but not into gold); and abandon it without using it.

    I wholeheartedly agree with your recommendation to use CGI or its relatives, but I don't think the code we see is doing any "parsing/decoding CGI" unless useless inconvenience to a whole bunch of electrons satisfies your definition. Rather, I have to go with OP's interpretation: lines 4-8 are useless; a longwinded NoOp; don't do anything useful.
          unless the snippet shown somehow misrepresents a bigger picture.

    Oops. That's what JavaFan says below, and more succinctly! ++ JavaFan.

    Update: Fixed the misquote, "parsing decoding CGI"
    And later, clarified para 2.