I have this simple code from Perl Cookbook which prints all directories and files recursively:
use File::Find;
@ARGV = qw(.) unless @ARGV;
find sub { print $File::Find::name, -d && '/', "\n" }, @ARGV;
I do not understand the grammar of print $File::Find::name, -d. How is this to interpret? If -d tests if $File::Find::nameis a directory so -dis a parameter of the function print? Or does Perl explicitly interpret a standalone -d as if -d?