in reply to How to avoid $_ in grep

If you want to name it $ARG, then stick use English; somewhere at the top of your code.

Update: As mentioned below, use English qw( -no_match_vars ); is even better. The English docs explain why.

Replies are listed 'Best First'.
Re^2: How to avoid $_ in grep
by agianni (Hermit) on Nov 13, 2007 at 20:54 UTC

    Great advice, and might I add:

    use English qw( -no_match_vars );

    is an even better idea.

    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'
      Ah, I didn't know this... those match variables are more trouble than they're worth! Thanks for the tip!