I'd thought that I would write about using Design by Contract preconditions and postconditions with Perl and VB. I had not used Perl lvalue subs before, but I thought it would be easy to use an lvalue sub to perform data validation as preconditions and postconditions. After much experimentation, then some Googling, I finally found a post about lvalue subs on Perl Monks explaining that you can't actually do anything with the value while you are in the lvalue sub:
Thus endeth the lesson for the day.
Contextual::Return (Score:1)
Extending lvalue subs is possible (Score:1)
http://perlmonks.org/?node_id=424644 [perlmonks.org]
http://perlmonks.org/?node_id=369354 [perlmonks.org]
The latter explains how to use tied variables in conjunction with lvalue subs as one way to accomplish what you are doing.
There are modules on CPAN (referenced in the links I believe) that show better ways.