http://www.perlmonks.org?node_id=991862


in reply to defining variables using my - subroutines

The question is nonsensical because subroutines in Perl only take and return lists, not variables. If you define tightly-scoped variables in a subroutine, they are not available outside of it. Instead of paraphrasing your approaches in English prose, show the code/attempts you already have, then we can properly discuss it.