Skeeve has asked for the wisdom of the Perl Monks concerning the following question:
I already found the solution thanks to Corion in the Chatterbox but I'm still unsure what's going on here.
When I coded this
$File::Find::prune= not $recurse and ($File::Find::dir ne $File::F +ind::topdir);
I got a "useless use of string ne in void context".
Putting parentheses around the code helped:
$File::Find::prune= (not $recurse and ($File::Find::dir ne $File:: +Find::topdir));
But I don't understand why. Can someone please enlighten me?
Update: Thanks to those who replied! Now I do understand!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need explanation for: useless use of string ne in void context
by Fletch (Bishop) on Jan 06, 2009 at 14:15 UTC | |
|
Re: Need explanation for: useless use of string ne in void context
by Corion (Patriarch) on Jan 06, 2009 at 14:20 UTC | |
by JavaFan (Canon) on Jan 06, 2009 at 14:42 UTC |