Hi Harry What do you want your code to do?
Andrew On Fri, Jun 23, 2017 at 9:56 PM, Harry Putnam <rea...@newsguy.com> wrote: > Trying for a better understand of using File::Find, butI'm missing > something pretty basic I think > > First: The directory structure in this test: > > ./one/tst.pl > two/tst.pl > three/tst.pl > > So each directory in the layering has the same type -f file in it. > > Or > ls -R ./one > ./one: > tst.pl two > > ./one/two: > three tst.pl > > ./one/two/three: > tst.pl > > I'm sure its something in my formulation (in other words, pilot > shooting self in foot) but; This bit of code seems not to do what one > would expect: > > ------- ------- ---=--- ------- ------- > > use strict; > use warnings; > use File::Find; > > my $d = './one'; > > find sub { > return if -f; > print "\$File::Find::dir<$File::Find::dir>\n"; > }, $d; > > ------- ------- ---=--- ------- ------- > > Output: > reader > ./tst.pl > $File::Find::dir<./one> > $File::Find::dir<./one> > $File::Find::dir<./one/two> > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- Andrew Solomon Mentor@Geekuni http://geekuni.com/ http://www.linkedin.com/in/asolomon