in reply to Strange behavior: passing $1 to AUTOLOAD
In general terms, it's a bad idea to expect $_ and $1 and similar to survive a function call, as explained above. It's best to save the value of these (in a my variable) before calling a function if you intend of reusing the value.