Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] match question

Expand Messages
  • Thiago Nascimento
    The code below is a option for do what you want: use CGI qw/:standard/; if (param) { subrotineBlah(param( B )); } HTH. ... -- Thiago Nascimento
    Message 1 of 2 , May 21, 2007
      The code below is a option for do what you want:

      <code>
      use CGI qw/:standard/;

      if (param) {
      subrotineBlah(param('B'));
      }
      </code>

      HTH.


      On 5/20/07, Lou Hernsen <lhernsen1015@...> wrote:
      >
      > Input from a form looks like
      > A=1&B=2&C=3
      >
      > I am trying to match
      > /B=+[&||\s]/ # which should match B=2
      > but I want to assign the match to a variable like this
      > $_= "A=1&B=2&C=3";
      > $B = /B=+&/;
      >
      > Why do I want to do this?
      > I thought it would be more secure to do this instead of
      > splitting the input at the "&"'s
      > and then again at the "="'s
      > and then assign the names and values to hashes
      > $Input{$key}=$Value
      >
      > this way I just take form the input string exactly what I need and ignore
      > the rest.
      > it also makes it easier to just pass the $input to a subroutine or a
      > package
      >
      > So... ok.. I'm probly doing it all wrong... i'm am amature perl programer
      > who programs for fun.
      > thanks
      > Lou
      >
      >
      >



      --
      Thiago Nascimento
      perl -e '$_="tMM naaCt Feocmama_itpUilucoGa";$_.=$1,print $2 while
      s/(..)(.)//;print substr$_,1,1;'
      "...just because I don't know the meaning of my art, does not mean it has no
      meaning..." S.D.


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.