in reply to Re^10: What does _ mean?
in thread What does _ mean?

But if performance is not an issue then the underscore is not really needed, and thus -d $filename and -d(_) would in effect give the same result, right? Based on merlyn's response below there is virtually no reason to use the underscore anymore.

Elda Taluta; Sarks Sark; Ark Arks

Replies are listed 'Best First'.
Re^12: What does _ mean?
by Anonymous Monk on Jun 21, 2010 at 23:13 UTC
    Based on merlyn's response below there is virtually no reason to use the underscore anymore.

    Except

    if ( -r -w -e -f $file and -s _ > 2300 ){ print "found a candidate\n"; }
      This thread has been about whether avoinding a second call to stat for a trivial performance gain is worth it or if it's better to use $file twice so that people reading the code do not have to try and figure out what the obscure "_" feature does. Unless using "_" in this context results in some other behavior beyond saving a call to stat you have contributed nothing new to this discussion/debate!!

      Elda Taluta; Sarks Sark; Ark Arks