in reply to Why $FIle::Find::prune = 1 returns used only once error
The difference is that use executes the module's code at compile time, basically making $File::Find::prune known earlier than with require, which executes at runtime. One really simple workaround is to use the variable twice: $File::Find::prune = $File::Find::prune = 1; (Update: Of course this removes typo protection if you happen to make the same typo twice, e.g. if you used copy&paste on the variable name.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why $File::Find::prune = 1 returns used only once error
by h2 (Beadle) on Apr 18, 2021 at 21:49 UTC |