in reply to passing variables to a sub

What do you expect this line of code to do:

     $sortby = $_;

I think it's wrong.

Replies are listed 'Best First'.
Re^2: passing variables to a sub
by ag4ve (Monk) on Oct 16, 2010 at 04:25 UTC
    i want to need to define all variables within all of my subroutines. i want $sortby to be defined by $_[0] and $ascdesc to be defined by $_[1] etc.

    i want these variables defined by the same variables outside of the sub. however, i don't want any changes to these variables to change their counterparts outside of my sub.