Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It's kind of ugly, but it might be the best solution..
It is ugly and it most definitely is not the best solution. The correct solution involves using a hash and iterating through that hash. One way of doing this could be: This also illustrates a very important concept in application development - separating the things that can change from the things that won't ... aka Encapsulation. We are separating out the logic from the things being logic'ed. This is especially important for you because you don't know which varnames you want to apply this logic to. ------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified. In reply to Re2: Validating the contents of scalars using an array based list
by dragonchild
|
|