DamianConway has given an answer about "how to do it".
I am curious as to "why?".
Many strange things are possible in Perl. Not all strange things that are possible are "good things". Can you provide more context about "why"?- meaning an example application?