Syntactic Confectionery Delight | |
PerlMonks |
Data::FormValidator questionby freddo411 (Chaplain) |
on Aug 30, 2005 at 20:05 UTC ( [id://487929]=perlquestion: print w/replies, xml ) | Need Help?? |
freddo411 has asked for the wisdom of the Perl Monks concerning the following question:
Hello All,
The Data::FormValidator docs say: A hash ref with field names as keys. Values are array references of built-in filters to apply (trim,digit,etc) or an anonymous subroutine which should take one parameter, the field value and return the (possibly) modified value. ===== OK so far, I want to use the mentioned anonymous sub. I'm not sure on the syntax. (How do I specify the input to pass in?) I set up a working sub MyFilter that takes one param. I tried: That doesn't work, which doesn't surprize me as I don't see how MyFilter is getting its input. Your comments and a working example would be much appreciated.
UPDATE: minor edit for a more illustrative field name
Cheers --Fred -------------------------------------
Back to
Seekers of Perl Wisdom
|
|