in reply to Need explanation for: useless use of string ne in void context
As is pretty much always the case with parsing questions, B::Deparse is your friend.
$ perl -MO=Deparse,-p,-q -we '$File::Find::prune= not $recurse and ($F +ile::Find::dir ne $File::Find::topdir);' Useless use of string ne in void context at -e line 1. Name "File::Find::prune" used only once: possible typo at -e line 1. Name "File::Find::topdir" used only once: possible typo at -e line 1. Name "File::Find::dir" used only once: possible typo at -e line 1. Name "main::recurse" used only once: possible typo at -e line 1. BEGIN { $^W = 1; } (($File::Find::prune = (!$recurse)) and ($File::Find::dir ne $File::Fi +nd::topdir)); -e syntax OK
and has a lower precedence than =; I think in fact someone posted a meditation on just this problem not last week.
Update: Meh, it was two weeks ago: Burned by precedence rules.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|