From the File::Find doc pages:
The first argument to find() is either a hash reference describing the operations to be performed for each file, or a code reference.
wanted: The value should be a code reference. This code reference is called the wanted() function below.
no_chdir: The script does not change each directory as it recurses.
What that basically means is if you only want to pass the code reference, you can just pass if, as you did in your first script. However, if you want to add any parameters to your call of File::Find (all of which are explained in the doc pages), you need to construct an anonymous hash:
{wanted => \&coderef, parameter => 'value'}
This is a common way of passing named parameters into functions.
hth.