in reply to Web Security

You should be compiling your regular expretions.
$REGS{'b_'}=qr/[^0-1]/;
...
($v=~$REGS{$v_id})?undef:1;
-- gam3
A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
Re^2: Web Security
by Anonymous Monk on Apr 13, 2005 at 11:57 UTC
    You should be compiling you regular expretions.
    Curious. There's so much that could be improved in the code, and you come up with something very minor, of which it's questionable whether it makes any difference.

    Since you don't say why you thing the regular expressions should be compiled, my question is, how would the code improve if the regular expressions were compiled? (Hint: it won't matter performance wise).

      Curious, you mention that soo much could be improved and yet instead of providing that you pick on an early poster. You don't even mention why there won't be a performance increase (when I think in fact there would be.) Another benifit of compiling the regex is that it looks cleaner, they are obviously regex, now you don't shove them in a string first. ;)
      Hi,

      There's so much that could be improved in the code,


      mind telling me in detail, please :)? (would give me the opportunity to learn)

      thanks to all the other repliers, I will have have a try on the Data::FormValidator module.

      bye