You need to pass an additional parameter to wanted. The way to do this is to use a closure: File::Find::find({wanted => sub { wanted( $size_input); } }, $fs_input ) ;. This way wanted is called by the anonymous sub, and gets passed $size_input.
See Why I hate File::Find and how I (hope I) fixed it for more info.
In reply to Re: passing argument to sub wanted
by mirod
in thread passing argument to sub wanted
by mikejones
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |