[root@dou perlref]# cat callback5.pl
#!/usr/bin/perl -w use strict;use File::Find;
sub what_to_do { -1 && !-e && print "bogus link: $File::Find::name\n"; } my @starting = qw(.); find({wanted=>\&what_to_do,no_chdir=>1},@starting);本文共 273 字,大约阅读时间需要 1 分钟。
[root@dou perlref]# cat callback5.pl
#!/usr/bin/perl -w use strict;use File::Find;
sub what_to_do { -1 && !-e && print "bogus link: $File::Find::name\n"; } my @starting = qw(.); find({wanted=>\&what_to_do,no_chdir=>1},@starting);转载于:https://blog.51cto.com/perfect/1065827