An important thing to keep in mind, is that you are defining a lexical variable with
my @in. This means it will only be in scope within that block, unless you use a method like flocto mentions above. Though it can be useful to subvert perl (sometimes essential?), one should always consider what is really trying to be accomplished and whether that subversion is truly necessary.
There may be a semantics problem here, too. One of the reasons that my was introduced to perl to was to give perl true local variabls, as local was a work around using a technique of substituting globals. What you would be telling perl is "please make this a local variable, but then don't be strict with me and let me use it anywhere I want without chiding me" (I hope that doesn't sound too harsh!). If you really want global variables, you probably want to use what perl terms as "package" variables:
Instead of using my, you would declare the package that you are in (probably just "main" in this case) like so:
$main::in = ...
Hope that helps. By the way, there are all kinds of nodes here discussing
local, my, our etc., and how various monks deal with scoping. Best of luck!