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


in reply to Why does my subroutine not receive the scalar parameter as $_?

Use $_[0] (the first element of @_) instead of $_.

See perlman:perlsub Description for explanation.