in reply to Re: the variable is lost
in thread the variable is lost

the question is not the variable's name.
when i change variable name warning still exist
install gnuwin32 you can use ls command in windows

Replies are listed 'Best First'.
Re^3: the variable is lost
by Anonymous Monk on Mar 09, 2012 at 09:18 UTC

    FWIW, using $a and $b outside of sort is always a mistake

      FWIW, using $a and $b outside of sort is always a mistake
      The special variables $a and $b are also used by List::Util's reduce function and by List::MoreUtils's pairwise function.

      For a grasshopper, just fresh out of the egg, and not really having a license yet to come anywhere near a keyboard, this is decent advice. It's the level of advice you give to a toddler who's about to start crawling. "Hot, don't touch".

      Anyone who has half a braincell he can fire up once a blue moon, however, will see how silly that is.

      A lot of code doesn't sort. Most code that does sort, doesn't even use the variant that makes Perl stuff $a and $b. And even if you do, even then you have to work hard to make a use of $a and $b make things mess up.

      If you really need to have a Pavlov reaction when you see an $a and/or a $b, and blind yourself from the fact a poster may have used well known example variable names, please keep your urges private, and don't hit that "create" button. It doesn't add any value.